Home Features Download Tutorial Version History License Source Code
This sample shows how to specify a PDF viewer application preferences using PDFDocument.ViewerPreferences property.
A PDF viewer application preferences specify the way the document is to be displayed on the screen.
There are the following supported viewer preferences:
- HideToolbar – gets or sets a value indicating whether to hide the viewer applications toolbars when.
- HideMenubar – gets or sets a value indicating whether to hide the viewer applications menu bar when.
- HideWindowUI – gets or sets a value indicating whether to hide user interface elements in the documents window (such as scroll bars and navigation controls), leaving only the document’s contents displayed.
- FitWindow – gets or sets a value indicating whether to resize the document’s window to fit.
- CenterWindow – gets or sets a value indicating whether to position the document’s window in.
- DisplayDocumentTitle – gets or sets a value indicating whether the window’s title bar should display.
- FullScreenPageMode – gets or sets how to display the document on exiting full-screen mode.
- Direction – gets or sets the predominant reading order for text.
using PDFMosaic; using System; namespace ViewerPreferences { class ViewerPreferences { static void Main() { PDFDocument document = new PDFDocument(); document.Pages.Add(new PDFPage(PDFPaperFormat.A4)); document.ViewerPreferences.CenterWindow = true; document.ViewerPreferences.FitWindow = true; document.ViewerPreferences.HideMenubar = true; document.ViewerPreferences.HideToolbar = true; document.ViewerPreferences.HideWindowUI = true; document.Save("ViewerPreferences.pdf", true); } } }
Home Features Download Tutorial Version History License Source Code