The PdfOptions class provides specific options when converting documents to different versions of PDF format.
PdfFormat sets the specific PDF format of the converted document. Available options are: Default, PdfA_1A, PdfA_1B, PdfA_2A, PdfA_3A, PdfA2B, PdfA_2U, PdfA_3B, PdfA_3U, v1_3, v1_4, v1_5, v1_6, v1_7, PdfX_1A, PdfX_3.
CompressImages whether to re-compress all the images in the document. The amount of compression is defined by the ImageQuality property.
ImageQuality defines the quality (in percentage) of image compression. Effective when the CompressImages property is set to true. To keep the original quality and image size set this property to 100. To decrease the image size set this property to less than 100.
UnembedFonts whether to replace the embedded fonts with references to these fonts. Decreases the file size, but may change the original design of the document.
The following code snippet shows how to specify PDF optimization options:
The PdfFormattingOptions class provides different options to change the formatting of the resulting document.
CenterWindow whether to position the document’s window in the center of the screen.
Direction defines the reading direction of the document: left to right or right to left. Available options are: L2R, R2L
DisplayDocTitle whether to display the document title in the window’s title bar.
FitWindow whether to resize the document window to fit the first displayed page.
HideMenuBar whether to hide the menu bar when the document is active.
HideToolBar whether to hide the toolbar when the document is active.
HideWindowUI whether to hide user interface elements when the document is active.
NonFullScreenPageMode - defines how to display the document when switching from the full-screen mode. Available options are: UseNone, UseOutlines, UseThumbs, FullScreen, UseOC, UseAttachments
PageLayout defines the page layout to use when the document is opened. Available options are: Default, SinglePage, OneColumn, TwoColumnLeft, TwoColumnRight, TwoPagesLeft, TwoPagesRight
PageMode defines how to display the document when it is opened. Available options are: UseNone, UseOutlines, UseThumbs, FullScreen, UseOC, UseAttachments
The following code snippet shows how to specify PDF formatting options: