<table><tr><td style="">michaelweghorn added a comment.
</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><div><blockquote style="border-left: 3px solid #8C98B8;
          color: #6B748C;
          font-style: italic;
          margin: 4px 0 12px 0;
          padding: 8px 12px;
          background-color: #F8F9FC;">
<div style="font-style: normal;
          padding-bottom: 4px;">In <a href="https://phabricator.kde.org/D10974#217646" style="background-color: #e7e7e7;
          border-color: #e7e7e7;
          border-radius: 3px;
          padding: 0 4px;
          font-weight: bold;
          color: black;text-decoration: none;" rel="noreferrer">D10974#217646</a>, <a href="https://phabricator.kde.org/p/aacid/" style="
              border-color: #f1f7ff;
              color: #19558d;
              background-color: #f1f7ff;
                border: 1px solid transparent;
                border-radius: 3px;
                font-weight: bold;
                padding: 0 4px;" rel="noreferrer">@aacid</a> wrote:</div>
<div style="margin: 0;
          padding: 0;
          border: 0;
          color: rgb(107, 116, 140);"><p>so you worded point 4 and point 6 (second point 5) differently "the document is not scaled at all now." vs "The document is scaled to the full page size", i would not expect Force Rasterize to cause different behaviour.</p>

<p>Is it just that you wrote it differently or does Force Rasterize actually change the behaviour of "Fit to printable area"?</p></div>
</blockquote>

<p>As of now, it actually does behave differently. The "Force rasterization" option does not use <tt style="background: #ebebeb; font-size: 13px;">FilePrinter</tt>, but Qt's "normal way of printing" (which is why e.g. n-up-printing also behaves a little different there). For the "Force rasterization" case, the only thing that changes is whether the printer margin is taken into account or not. If you print an A4 document to A3 paper and unselecting the "Fit to printable area", currently</p>

<ul class="remarkup-list">
<li class="remarkup-list-item"><tt style="background: #ebebeb; font-size: 13px;">FilePrinter</tt> would not scale the document at all, thus leaving a lot of blank space on the printout.</li>
<li class="remarkup-list-item">The "force rasterization" option would scale the document to A3, ignoring the printer hardware margins.</li>
</ul>

<p>Thinking about this again, I think <tt style="background: #ebebeb; font-size: 13px;">FilePrinter</tt> should react to the value returned by <tt style="background: #ebebeb; font-size: 13px;">QPrinter::fullPage()</tt> in the same way as the "force rasterization" option, since this is what the option actually means [1]:</p>

<blockquote style="border-left: 3px solid #a7b5bf; color: #464c5c; font-style: italic; margin: 4px 0 12px 0; padding: 4px 12px; background-color: #f8f9fc;"><p><tt style="background: #ebebeb; font-size: 13px;">void QPrinter::setFullPage(bool fp)</tt><br />
 If fp is true, enables support for painting over the entire page; otherwise restricts painting to the printable area reported by the device.</p></blockquote>

<p>Rather than not setting the "fit-to-page" option, the margins should not be set in FilePrinter in this case.</p>

<p>When document page size and the printer's page size is the same, this does not make any difference as compared to not setting the <tt style="background: #ebebeb; font-size: 13px;">fit-to-page</tt> option. But it does make a diference when the two page sizes do not match (as described above).</p>

<p>What do you think?</p>

<p>1: <a href="http://doc.qt.io/qt-5/qprinter.html#fullPage" class="remarkup-link" target="_blank" rel="noreferrer">http://doc.qt.io/qt-5/qprinter.html#fullPage</a></p></div></div><br /><div><strong>REPOSITORY</strong><div><div>R223 Okular</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>To: </strong>michaelweghorn, Okular<br /><strong>Cc: </strong>aacid, ngraham, michaelweghorn<br /></div>