Windows
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 Windows WPF program.

 

Display Modes

 

View mode

 

- CPDFViewer supports a number of view modes, you can use CPDFViewer.ChangeViewMode(ViewMode newMode) to set. View mode values are as follows:

- ViewMode::Single: Displays one page at a time, swiping left and right to change pages.

- ViewMode::SingleContinuous: Displays one page at a time, scrolling up and down to change pages.

- ViewMode::Double: Displays two pages at a time, with odd-numbered pages on left, swiping left and right to change pages.

- ViewMode::DoubleContinuous: Displays pages in two columns, with odd-numbered pages on left, scrolling up and down to change pages.

- ViewMode::Book: Displays two pages at a time, with odd-numbered pages on right, swiping left and right to change pages.

- ViewMode::BookContinuous: Display pages in two columns, with odd-numbered pages on right, scrolling up and down to change pages.

 

Crop mode

Automatically trim PDF white margins to resize pages. Crop mode can be enabled by setting the page crop mode to true.

 

CPDFViewer.SetCropMode(true);