<table><tr><td style="">michaelweghorn created this revision.<br />michaelweghorn added a reviewer: Okular.<br />Restricted Application added a project: Okular.<br />michaelweghorn requested review of this revision.
</td><a style="text-decoration: none; padding: 4px 8px; margin: 0 8px 8px; float: right; color: #464C5C; font-weight: bold; border-radius: 3px; background-color: #F7F7F9; background-image: linear-gradient(to bottom,#fff,#f1f0f1); display: inline-block; border: 1px solid rgba(71,87,120,.2);" href="https://phabricator.kde.org/D10974" rel="noreferrer">View Revision</a></tr></table><br /><div><strong>REVISION SUMMARY</strong><div><p>This adds a checkbox in the print dialog to<br />
make it possible to select whether or not to scale the printed<br />
document to the printable area when printing.</p>
<p>QPrinter::setFullPage() is used which makes the print margins<br />
to be ignored in case of the QPrinter based approach<br />
(e.g. "Force rasterization" option enabled).<br />
For the case where FilePrinter is used, the "fit-to-page" option<br />
is (not) passed based on the value that was set.</p>
<p>BUG: 336617</p></div></div><br /><div><strong>TEST PLAN</strong><div><ol class="remarkup-list">
<li class="remarkup-list-item">Open a PDF file in Okular (using a document size that matches a paper size available on the printer used later makes it easier to see things behave as expected)</li>
</ol>
<ol class="remarkup-list" start="2">
<li class="remarkup-list-item">open print dialog, go to "PDF options" and notice that there is a new "Fit to printable area" checkbox that is enabled by default.</li>
</ol>
<ol class="remarkup-list" start="3">
<li class="remarkup-list-item">don't change any options, print to a printer that has hardware margins</li>
</ol>
<p>Expected result: the document is scaled to the printable area (e.g.<br />
scaled down so that the printer's hardware margins remain empty) as it<br />
has been without this change.</p>
<ol class="remarkup-list" start="4">
<li class="remarkup-list-item">disable the "PDF options" -> "Fit to printable area" checkbox and print again</li>
</ol>
<p>Expected result: the document is not scaled at all now.</p>
<ol class="remarkup-list" start="5">
<li class="remarkup-list-item">print again, now leaving "Fit to printable area" enabled and selecting</li>
</ol>
<p>"Force rasterize" in addition.</p>
<p>Expected result: The document is scaled to the printable area (as it was<br />
without this change).</p>
<ol class="remarkup-list" start="5">
<li class="remarkup-list-item">print again, now disabling "Fit to printable area" and selecting</li>
</ol>
<p>"Force rasterize" in addition.</p>
<p>Expected result: The document is scaled to the full page size, i.e. ignoring<br />
the printers hardware margins.</p></div></div><br /><div><strong>REPOSITORY</strong><div><div>R223 Okular</div></div></div><br /><div><strong>BRANCH</strong><div><div>michaelweghorn/kdebug336617_makeFitToPageOptional</div></div></div><br /><div><strong>REVISION DETAIL</strong><div><a href="https://phabricator.kde.org/D10974" rel="noreferrer">https://phabricator.kde.org/D10974</a></div></div><br /><div><strong>AFFECTED FILES</strong><div><div>core/fileprinter.cpp<br />
generators/poppler/generator_pdf.cpp</div></div></div><br /><div><strong>To: </strong>michaelweghorn, Okular<br /><strong>Cc: </strong>michaelweghorn, ngraham, aacid<br /></div>