|
Open Actions. The way in which a PDF is displayed when
opened is dependent on certain flags within the PDF itself. Here
are some common combinations. For full details of how these work
you should see the Adobe PDF Specification available from the Adobe
web site.
To show outlines:
theDoc.SetInfo(theDoc.Root, "/PageMode", "/UseOutlines")
Or for thumbnails:
theDoc.SetInfo theDoc.Root, "/PageMode", "/UseThumbs"
To display two pages side by side:
theDoc.SetInfo(theDoc.Root, "/PageLayout", "/TwoColumnLeft")
To make the print dialog appear when the document is opened:
theDoc.SetInfo(theDoc.Root, "/OpenAction", "<< /Type /Action /S /Named /N /Print >>")
To open at 200% zoom onto the current page:
theDoc.SetInfo(theDoc.Root, "/OpenAction", "[ " + theDoc.Page.ToString() +" 0 R /XYZ null null 2 ]")
To fit the document width onto the current page:
theDoc.SetInfo(theDoc.Root, "/OpenAction", "[ " + theDoc.Page.ToString() + " 0 R /FitH " + theDoc.MediaBox.Height.ToString() + " ]")
|