PDF: Implement scaling options for non-rasterized printing

Authored by michaelweghorn on Apr 15 2019, 3:08 AM.

Description

PDF: Implement scaling options for non-rasterized printing

Summary:
This adds another 'FilePrinter::printFile' method that
accepts an additional parameter to specify whether or not to
do scaling and passes the 'fit-to-page' to CUPS dependent
on what is specified.

If FilePrinter is used, The PDF generator now passes this
option depending on the scaling mode that was selected in the
custom print options widget, which is therefore now enabled
for non-rasterized printing as well.

Test Plan:

  1. open a PDF document in Okular and open the print dialog
  2. go to the "PDF Options" tab
  3. verify that "Force rasterisation" is disabled, but the "Scale mode" combobox is active.
  4. test all the three options available in the "Scale mode" combobox do what they say
  5. Make sure the three options still work as expected for the "Force rasterisation" case.

Reviewers: Okular, ngraham, sander

Reviewed By: ngraham

Subscribers: aacid, fvogt, okular-devel

Tags: Okular

Differential Revision: https://phabricator.kde.org/D18179

Details