Skip to content
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.ChangeFitMode(FitMode.FitSize);

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.ChangeFitMode(FitMode.FitFree);

// Set the zoom mode to custom.
myCPDFViewer.Zoom(5.0)

Explanation of Zooming Modes

ModeDescriptionOption Value
Fit WidthAdjusts the page width to fit within the display area.FitMode.FitWidth
Fit HeightAdjusts the page height to fit within the display area.FitMode.FitHeight
Fit SizeMakes the entire page visible within the display area.FitMode.FitSize
CustomDoes not adjust based on display area size; allows custom zoom value.FitMode.FitFree