~neon/okular/master

Viewing all changes in revision 5083.

  • Committer: Oliver Sander
  • Date: 2017-08-10 15:27:27 UTC
  • Revision ID: git-v1:0c4c2ddbbc5e509c69b72c99bf6e83a356669eba
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

expand all expand all

Show diffs side-by-side

added added

removed removed

Lines of Context: