PdfViewerPreferences

data class PdfViewerPreferences(val hideToolbar: Boolean = false, val hideMenubar: Boolean = false, val hideWindowUI: Boolean = false, val fitWindow: Boolean = false, val centerWindow: Boolean = false, val displayDocTitle: Boolean = false, val nonFullScreenPageMode: PageMode = PageMode.UseNone, val direction: PdfViewerPreferences.ReadingDirection = ReadingDirection.LeftToRight, val viewArea: PdfViewerPreferences.PageBoxName = PageBoxName.CropBox, val viewClip: PdfViewerPreferences.PageBoxName = PageBoxName.CropBox, val printArea: PdfViewerPreferences.PageBoxName = PageBoxName.CropBox, val printClip: PdfViewerPreferences.PageBoxName = PageBoxName.CropBox, val printScaling: PdfViewerPreferences.PrintScaling = PrintScaling.AppDefault, val duplex: PdfViewerPreferences.Duplex = Duplex.Simplex, val pickTrayByPdfSize: Boolean = false, val numCopies: Int = 1, val printPageRange: List<IntRange> = emptyList())

Catalog /ViewerPreferences dictionary (ISO 32000-1 §12.2).

Hints from the document author about how to present and print the file. All fields are optional in the spec and have a documented default; we surface those defaults here so callers never have to check for null.

"Hint" is the operative word — viewers may ignore any or all of these. KitePDF doesn't enforce them; it just exposes them.

Constructors

Link copied to clipboard
constructor(hideToolbar: Boolean = false, hideMenubar: Boolean = false, hideWindowUI: Boolean = false, fitWindow: Boolean = false, centerWindow: Boolean = false, displayDocTitle: Boolean = false, nonFullScreenPageMode: PageMode = PageMode.UseNone, direction: PdfViewerPreferences.ReadingDirection = ReadingDirection.LeftToRight, viewArea: PdfViewerPreferences.PageBoxName = PageBoxName.CropBox, viewClip: PdfViewerPreferences.PageBoxName = PageBoxName.CropBox, printArea: PdfViewerPreferences.PageBoxName = PageBoxName.CropBox, printClip: PdfViewerPreferences.PageBoxName = PageBoxName.CropBox, printScaling: PdfViewerPreferences.PrintScaling = PrintScaling.AppDefault, duplex: PdfViewerPreferences.Duplex = Duplex.Simplex, pickTrayByPdfSize: Boolean = false, numCopies: Int = 1, printPageRange: List<IntRange> = emptyList())

Types

Link copied to clipboard
object Companion
Link copied to clipboard

Properties

Link copied to clipboard
val centerWindow: Boolean = false

Centre the window on the screen. Default false.

Link copied to clipboard
Link copied to clipboard

Use /Info /Title (or /dc:title) as the window-title text. Default false; PDF 1.4.

Link copied to clipboard

Duplex preference — PDF 1.7+. Default Duplex.Simplex.

Link copied to clipboard
val fitWindow: Boolean = false

Resize the window to the first page on open. Default false.

Link copied to clipboard
val hideMenubar: Boolean = false

Hide the menubar. Default false.

Link copied to clipboard
val hideToolbar: Boolean = false

Hide the toolbar. Default false.

Link copied to clipboard
val hideWindowUI: Boolean = false

Hide window chrome (scrollbars, status, panels). Default false.

Link copied to clipboard

Which PageMode to use when leaving FullScreen. Default PageMode.UseNone.

Link copied to clipboard
val numCopies: Int = 1

Default number of copies when printing — PDF 1.7. Default 1.

Link copied to clipboard

Pick the paper tray by PDF page size — PDF 1.7. Default false.

Link copied to clipboard

Page box used when printing. Default PageBoxName.CropBox.

Link copied to clipboard

Box to clip the printed page to. Default PageBoxName.CropBox.

Link copied to clipboard

Default page ranges to print as [firstA lastA firstB lastB …] (one-based, inclusive). Empty when /PrintPageRange is absent — PDF 1.7.

Link copied to clipboard

Print scaling preference — PDF 1.6+. Default PrintScaling.AppDefault.

Link copied to clipboard

Which page box to display when viewing. Default PageBoxName.CropBox.

Link copied to clipboard

Box to clip the rendered page to when viewing. Default PageBoxName.CropBox.