I have a PDF that I generate via the CFDocument tag. When it generates the PDF and you click on the "printer" icon to pop up the print dialog. For Page Sizing & Handling if it's set to either "Fit" or "Shrink oversized pages", it prints fine. If "Actual size" is selected then the header gets shifted off the page and gets chopped off. I'm using ColdFusion 11 on Windows 7.
To recreate this, I removed all my styles and did a simple test with the following basic code:
<cfdocument format="PDF" saveAsName="test_#dateFormat(now(),'yyyymmdd')#T#timeFormat(now(),'hhmmss')#.pdf">
<cfdocumentitem type="header">HEADER</cfdocumentitem>
<cfdocumentsection>
BODY
</cfdocumentsection>
<cfdocumentitem type="footer">
#cfdocument.currentpagenumber# / #cfdocument.totalpagecount#
</cfdocumentitem>
</cfdocument>
Which generates the following PDF:
Then I click the "Printer" icon which pops up the printer settings:
If you look closely to the preview image in the dialog box, you can see that the header text is within the document. Now if I select "Actual size" instead, it gives the following:
If you look at the preview, this time you can see that everything shifted up and the header is partially outside the document which results in half of the header getting chopped off and illegible when printed.
Anyone know why this is happening and how to fix it?
cfdocument
tag attributes, especiallypageType
and themargin
ones. – Alex<div style="margin-top: 10px">HEADER</div>
. – Leigh