property FitMode: TPdfViewFitMode;
FitMode is the standard PDF-viewer fit-page / fit-width selector exposed as a published property so applications can drop a TPdfView onto a form and pick a layout without writing zoom math. Each value maps onto a clear visual behaviour:
Zoom the application or end user sets is honoured exactly. This is the default to preserve pre-v1.19.0 behaviour for existing applications.The active fit mode is re-applied automatically when the control is resized and when the current page changes — that is the whole point of FitMode versus a one-shot zoom assignment. Long documents with mixed page sizes (a portrait cover followed by landscape spreads, for example) stay perfectly framed without any extra Resize / OnPageChange handler.
Setting Zoom directly cancels the active fit mode and
reverts FitMode to pfmNone, matching the standard PDF
viewer convention where typing a zoom percentage drops out of "Fit
Page" / "Fit Width". This keeps the property value honest:
FitMode <> pfmNone means "the view will re-fit on
the next layout event".
SmoothScroll for the classic "long-document reader" feel.
// Whole page fits in viewport, even after resize / page change
PdfView1.FitMode := pfmFitPage;
// Page width matches viewport width — long-document reading mode
PdfView1.FitMode := pfmFitWidth;
// 100% — one PDF point per pixel
PdfView1.FitMode := pfmActualSize;
// User types a zoom value → drop out of fit mode
PdfView1.Zoom := 1.5;
Assert(PdfView1.FitMode = pfmNone);