GoToPage

Viewer interaction

Description

Moves the Viewer to the given one-based page, clamped into the valid range, and returns the page actually shown. When the page changes the viewer drains finished background renderings into the cache, refreshes the layout, scrolls a continuous layout to the page band, requests the neighbouring pages for prefetching and fires

OnPageChange

Syntax

Delphi

Function TPDFlibViewer.GoToPage(NewPage: Integer): Integer;

Parameters

NewPageRequested one-based page index; values below 1 and beyond the last page are clamped

Return values

0No document is open
Positive valueThe page now shown, unchanged when NewPage was already current or after clamping

See also

TPDFlibViewer, NextPage, GoToPagePoint, PageCount, CloseDocument