I need to generate a pdf document that has the Print Options of Page Scaling set to "None" or "Actual Size"
This setting in the document would mean that the default when you open the document in Adobe Reader
or other PDF reader will be " Do not Shrink this page to fit in the printer margins"
In Adobe Reader 10 the setting I would like to control is under the Print dialog and "Page Sizing & Handling" the option for "Size Options" I would like the document to default to "Actual Size" instead of "Shrink oversized pages".
I have talked to my sources and tested with creating/saving a PDF document with Adobe Standard edition and you can set the View properties of the document to have a default for this exact property and Adobe Reader will honor that instead of using the Adobe Reader default which is shink.
I am using PDF Creator 1.5.0 to "Print" the pfd document which seems to allow postscript to be applied to the document. However I could use a alternate PDF printer if it suited my purpose and had this option. I do not see any GUI option in PDF Creator settings for controlling it.
I am pretty sure I could use ghostscript to apply a property but I need to know how to do it.
Update: I have been looking at the Adobe pdf specification and the document properties I am looking for seem to be in the PDF 1.6 specification.
12.2 Viewer Preferences
The ViewerPreferences entry in a document’s catalogue (see 7.7.2, “Document Catalog”) designates a viewer
preferences dictionary (PDF 1.2) controlling the way the document shall be presented on the screen or in print.
If no such dictionary is specified, conforming readers should behave in accordance with their own current user
preference settings. Table 150 shows the contents of the viewer preferences dictionary.PrintScaling – (Optional; PDF 1.6) The page scaling option that shall be selected
when a print dialog is displayed for this document. Valid values
are None, which indicates no page scaling, and AppDefault, which
indicates the conforming reader’s default print scaling. If this entry
has an unrecognized value, AppDefault shall be used. Default
value: AppDefault.
If the print dialog is suppressed and its parameters are provided
from some other source, this entry nevertheless shall be honored.
This is EXACTLY what I want to control through some 3rd party PDF printer software or ghostscript. I am not a PDF expert and I don't know how to do it.
Update: I developed a solution using Pdf Creator and edited the solution into the accepted answer. I also looked at the following that has potential for applications when using an API to generate the pdf.
Solid Documents pdf
itextpdf – Also available in a C# version
Best Answer
This should be possible by specifying
/PrintScaling /None
in theViewerPreferences
dict (see section 12.2 in ISO 32000-1:2008.Update: Try this:
See http://www.digipedia.pl/usenet/thread/1191/1835/
Update: From Poster
The final solution was to add the above postscript line into the postscript generated by PDF Creator using the "Actions" feature of PDF Creator. (Action Before Saving)
http://www.pdfforge.org/content/actions
I also used this link as inspiration for the action and looked at the preinstalled vbs scripts to figure out what needed to be done to add information to the convert to pdf postscript file.
PDFCreator Document View settings - It seems that a script similar to this used to be included in PdfCreator.
Anyway this is my final script that can be added to Pdf Creator to add the PrintScaling default property.
I can't take credit for the ini file class used to parse the output from PdfCreator that was provided via the existing vbs scrips in PdfCreator.