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
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
| NewPage | Requested one-based page index; values below 1 and beyond the last page are clamped |
|---|
Return values
| 0 | No document is open |
|---|---|
| Positive value | The page now shown, unchanged when NewPage was already current or after clamping |
See also
TPDFlibViewer, NextPage, GoToPagePoint, PageCount, CloseDocument