Customizing Android PDF viewer with PDFViewCtrl
The PDFViewCtrl has a large API set that can be used to control how the PDF is presented to the user. This guide highlights some of the most commonly used functionality.
If you are using a DocumentActivity (or PdfViewCtrlTabHostFragment2), the contained PDFViewCtrl can be customized through PDFViewCtrlConfig.
Customize the viewing experience
Custom page colors including day mode, night mode, or custom color mode
Automatic and dynamic page fit/zoom control using fit page, fit width, fit height, or zoom
Page layout mode and scrolling direction (i.e. vertical scrolling or continuous view mode)
Properties and methods
SetPagePresentationMode
Set how pages are presented and scrolled: in 1 or 2 columns, scrolled vertically or horizontally
SetPageViewMode
Sets the zoom level relative to the page size, fit-width, fit-height or fit-page.
SetPageRefViewMode
When a document is scrolled via horizontal swipes, use this method to control what zoom level new pages are rendered at.
SetClientBackgroundColor
Sets the color that is seen around pages.
SetupThumbnails
Controls how low-resolution thumbnails are handled. Enlarged thumbnails are used in place of high-resolution content while the high-resolution content is being rendered.
SetProgressiveRendering
Controls how frequently the high-resolution content is updated while it is being rendered.
SetDrawAnnotations
Controls if annotations are visible.
SetHighlightFields
Controls if form fields are shaded with light blue.
SetOverprint
Controls how PDFs that use overprint colors are rendered.
SetColorPostProcessMode
Can be used to turn on night-mode and other color processing changes.
Last updated
Was this helpful?