THotPDF.GetLoadedPageVisibleBox Method
Gives back the area of a loaded page that is displayed and printed: the /CropBox clipped against the /MediaBox
Declaration
function GetLoadedPageVisibleBox(
PageIndex: Integer;
out Left, Bottom, Right, Top: Single): boolean;
Unit
HPDFDoc
Parameters
| Name | Purpose |
|---|---|
PageIndex | Index of the loaded page, counting from zero |
Left, Bottom, Right, Top | Receive the box in default user space units, such that Left < Right and Bottom < Top |
Return value
True whenever the page exists and carries a usable /MediaBox; a False result leaves the output values untouched, so a default page size may be preset in advance
Usage notes
- A page is shown and printed by way of its /CropBox, which falls back to the /MediaBox and is clipped against it (ISO 32000-1 14.11.2); a /CropBox failing to overlap the /MediaBox is disregarded
RenderLoadedPageToBitmap, the tile, band and metafile renderers,BuildLoadedPageSVG, the viewer and printing all work across this box; before /Rotate is applied, its lower-left corner maps onto the lower-left corner of the output- To read a page box entry exactly as stored, turn to
GetLoadedPageBox