PDFium Delphi Component Docs

TPdfThumbnailView class

Unit: FPdfThumbnail
Scrollable control that arranges PDF page thumbnails vertically or horizontally and lets the user navigate by clicking a thumbnail

Syntax

type TPdfThumbnailOrientation = (ptoVertical, ptoHorizontal);
type TPdfThumbnailView = class(TCustomControl) ... end;

Methods

MemberDescription
CreateInitializes default thumbnail sizing, colors, scrolling, and selection state
DestroyReleases internal thumbnail-control resources
EnsureCurrentPageVisibleScrolls the thumbnail viewport only when the selected one-based page lies outside the visible range

Properties

PropertyTypeDefaultDescription
PdfTPdfnilDocument component used for page count and thumbnail rendering
CurrentPageIndexInteger0One-based selected page index; changing it keeps the selected thumbnail visible, while 0 means no selection
OrientationTPdfThumbnailOrientationptoVerticalChooses a vertical list with a right scrollbar or a horizontal strip with a bottom scrollbar
FirstVisiblePageIndexIntegerRead-onlyOne-based first page in the current thumbnail viewport, or 0 when no document page is available
LastVisiblePageIndexIntegerRead-onlyOne-based last page in the current thumbnail viewport, or 0 when no document page is available
ThumbnailWidthInteger120Target thumbnail width, clamped to the supported range
ThumbnailHeightInteger160Target thumbnail height, clamped to the supported range
TextColorTColorclBlackPage-number caption color
HoverColorTColorclMoneyGreenRow highlight color under the hovered thumbnail
SelectionColorTColorclHighlightRow highlight color for CurrentPageIndex
BorderColorTColorclGrayThumbnail border color
ColorTColorclWhiteControl background color inherited from TCustomControl
Align, Anchors, Visible—Re-published TControl properties for standard form placement and visibility

Events

EventTypeDescription
OnPageClickTPdfThumbnailClickEventRaised when the user left-clicks a thumbnail row; APageIndex is one-based

Description

Assign Pdf to the same TPdf instance used by a viewer, then keep CurrentPageIndex synchronized with the active page

Use ptoVertical for a sidebar or ptoHorizontal for a filmstrip, with hit testing, painting, scrolling, and visible-range queries following the selected orientation

The control owns its scrolling and keeps rendered bitmaps only for the current visible page range, so overlapping pages are reused during adjacent scrolling without retaining a long document in memory

Assigning another Pdf or changing ThumbnailWidth or ThumbnailHeight clears the cached bitmaps, while hover and current-page state changes reuse them

Handle OnPageClick to update a paired TPdfView.PageNumber or any other page-navigation surface

Example

ThumbnailView.Pdf := Pdf1;
ThumbnailView.Orientation := ptoHorizontal;
ThumbnailView.CurrentPageIndex := PdfView1.PageNumber;
ThumbnailView.OnPageClick := ThumbnailPageClick;

See Also

TPdfView, TPdfView.PageNumber