On this page
Guides
Zooming
Page zoom refers to adjusting the level of magnification or reduction of a page within a PDF document to accommodate the user's visual preferences or device screen size. CPDFViewer
offers various automatic zoom modes and also supports manual zooming.
In automatic zoom mode, the document zoom level automatically adjusts to changes in the display area size as it evolves.
This example shows how to set automatic zooming:
C#
// Set the zoom mode to make the entire page visible within the display area.
myCPDFViewer.SetFitMode(FitMode.FitOriginal);
You can also set the zoom mode to custom and specify the scaling ratio.
This example shows how to set custom zooming:
C#
// Set the zoom mode to custom.
myCPDFViewer.SetFitMode(FitMode.FitOriginal);
// Set the zoom mode to custom.
myCPDFViewer.SetZoom(5.0)
Explanation of Zooming Modes
Mode | Description | Option Value |
---|---|---|
Fit Width | Adjusts the page width to fit within the display area. | FitMode.FitWidth |
Fit Height | Adjusts the page height to fit within the display area. | FitMode.FitHeight |
Fit Size | Makes the entire page visible within the display area. | FitMode.FitSize |
Custom | Does not adjust based on display area size; allows custom zoom value. | FitMode.FitFree |