Android
ComPDFKit PDF SDK
Guides

Viewer

 

The viewer is a viewing and rasterization scroll view component that handles a number of viewing operations including rendering, caching, high level zoom rendering and layout modes. It offers developers a way to quickly embed a highly configurable PDF viewer in any Android application.

 

Display Modes

 

Scroll direction

When scrolling through pages of a document in CPDFReaderView, the scrolling direction can be changed by setting the page display direction.

 

- Vertical scrolling mode can be enabled by setting the page presentation mode to readerView.setVerticalMode(true).

- Horizontal scrolling mode can be enabled by setting the page presentation mode to readerView.setVerticalMode(false).

- Continuous scrolling mode can be enabled by setting the page presentation mode to readerView.setContinueMode(true).

- Double page mode can be enabled by setting the page presentation mode to readerView.setDoublePageMode(true).

Cover mode

Show cover page during two-up.

readerView.setDoublePageMode(true);
readerView.setVerticalMode(true);

Crop mode

Automatically trim PDF white margins to resize pages.

readerView.setCropMode(true);