Both the Muhimbi PDF Converter API and Server Platform and the Muhimbi PDF Converter for SharePoint have had the ability to carry out PDF post processing for quite some time (e.g. PDF/A1b conversion, Applying Security settings, watermarking). Starting with version 7.0 another post processing facility has been added, which is the ability to set PDF Viewer Preferences.
Viewer Preferences are hints for the application that is used to view the PDF file, e.g. Adobe Acrobat. These hints are embedded in the PDF file and control such things as the visibility of the Menu and Toolbars, the various panels such as Bookmarks / Attachments, or even viewing the PDF in full screen mode. Please be aware that these are merely hints and not every PDF Reader supports all of them.
The following Viewer Preferences are supported by the Muhimbi PDF Converter:
- CenterWindow: Position the document window in the center of the screen.
- DisplayTitle: Display the Document Title in the PDF Reader's window.
- FitWindow: Resize the PDF Viewer's window to fit the size of the first page.
- HideMenubar: Hide the PDF viewer's menu bar.
- HideToolbar: Hide the PDF viewer's tool bars.
- HideWindowUI: Hide the user interface elements in the document windows and only display the document's content.
- PageLayout: The page layout to use for the document.
- NavigationPane: The navigation pane to display when the document is opened.
- HideEmptyNavigationPane: If there is no content in the pane then hide it. E.g. when the bookmarks (Outlines) pane is selected, but there are no bookmarks defined, then the pane is hidden.
- PageScalingMode: Default scaling option when printing the document.
- FullScreen: Display the PDF in full screen mode.
At Muhimbi we pride ourselves at going the extra mile so we have implemented a flag that we believe to be unique, HideEmptyNavigationPane checks if any bookmarks or attachments are present and hide those panes if there is no content. This prevents a cluttered user interface when end users view your PDFs.
Viewer Preferences can currently only be specified when using the Web Services interface by setting ConversionSettings.
OutputFormatSpecificSettings (or MergeSettings.OutputFormatSpecificSettings) to an instance of OutputFormatSpecificSettings_PDF and populating the ViewerPreferences property. Confused? Here is a class diagram.
If you are developing in Java then please use Axis2 ( example) as wsimport ( example) does not deal well with web service properties that derive from a common base class. ( You need to jump through a lot of hoops, seriously, don’t use wsimport in this case).
If you have any questions then leave a comment below or contact us.
Labels: Articles, News, pdf, PDF Converter, PDF Converter Services