API referenceRendering & Viewer

rasGetPageInfo

Report a page's rendered pixel/logical geometry at the

C
BOOL32 __stdcall rasGetPageInfo(IPGC CachePtr, int32_t PageNum, TPDFPageInfo* Value);
Delphi
function rasGetPageInfo(CachePtr: IPGC; PageNum: Integer; var Value: TPDFPageInfo): LongBool; stdcall;

Purpose. Report a page's rendered pixel/logical geometry at the cache's current zoom.

Description. Computes PixW/PixH (Round(pw/ph * C.Zoom)) and DestW/DestH (the unrounded float equivalents), Zoom as a rounded percentage (Round(C.Zoom * 100)), and TileW/TileH set equal to PixW/PixH — i.e. this function reports the page as one single "tile" the size of the whole page, not the cache's actual tile-grid subdivision (if any) used by the real tile-render pipeline (Rendering, Painting, and the Tile Pipeline). DestX/DestY are always 0, regardless of the page's actual position within the scrolled continuous layout — contrast rasGetPagePos/rasGetPageMatrix below, which do compute real scroll-relative positions for a given page.

Parameters.

ParameterDescription
CachePtrTarget page cache.
PageNum1-based page.
ValueOutput TPDFPageInfo; DestX/DestY always 0; TileW/TileH always equal PixW/PixH (whole-page, not real tile size).

Return value. True if the page resolves; False otherwise.

C# (P/Invoke)

wrappers/dotnet/LumasPdf.cs
[return: MarshalAs(UnmanagedType.Bool)]
Area
Rendering & Viewer
Category

Rasterizer/Rendering

Exported names

rasGetPageInfo

String variants

The …A form takes UTF-8, …W takes UTF-16; a bare name aliases the ANSI form.

See working code

Worked examples — complete programs in ten languages.