Print via QPrinter when rasterizing and printing annotations

Authored by sander on Aug 4 2017, 8:06 PM.

Description

Print via QPrinter when rasterizing and printing annotations

When the user chooses to print with rasterization and annotations,
it is easy to print directly to a QPrinter, rather than converting
to PostScript and then using CUPS tools. The code for it was
already there, but it was hidden behind an #ifdef Q_OS_WIN.
This patch enables it for all plattforms. If nothing else,
it will make an interesting debugging tool, because it allows
to bypass the postscript & CUPS toolchain from the GUI.
This may allow to track down some of the numerous my-printer-settings-
are-getting-ignored bugs.

The previously windows-only rasterization code used printer.physicalDpiX()
as the rasterization resolution. At least on my machine this resulted
in a dpi value of 1200, which means quite a lot of memory is used.
I left the windows code untouched, but on Unix I lowered that value
to 300dpi, which is what the postscript rasterizer uses.

Incidentally, this patch does fix at least one bug for me:
Without it, my printer will happily ignore the 'print in grayscale'
button. With the patch, that button is suddenly honoured.

REVIEW: 130218

Details

Committed
sanderAug 10 2017, 3:27 PM
Parents
R223:024d25cdeca1: Simplify the drawing of buffered highlight rectangles
Branches
Unknown
Tags
Unknown