THotPDF.SetLoadedPageBox Method
Sets the page bounding box (MediaBox, CropBox, BleedBox, TrimBox, or ArtBox) for the specified page in the loaded PDF document
Declaration
procedure SetLoadedPageBox(PageIndex: Integer; Box: THPDFPageBoundary; ARect: THPDFRect);
Unit
HPDFDoc
Parameters
| Name | Purpose |
|---|---|
PageIndex | Zero-based index of the target page; 0 indicates the first page |
Box | The type of page boundary to set, which takes the value of the THPDFPageBoundary enumeration (MediaBox, CropBox, BleedBox, TrimBox, ArtBox) |
ARect | New bounding rectangle, represented in PDF user space coordinates (points) with the origin at the bottom-left corner |
Bottom | Page coordinate or size value expressed in the current HotPDF coordinate space |
Right | Page coordinate or size value expressed in the current HotPDF coordinate space |
Top | Page coordinate or size value expressed in the current HotPDF coordinate space |
Return value
This member returns no value
Usage notes
- The CropBox must sit fully inside the MediaBox, otherwise printing or display may clip unexpectedly
- BleedBox and TrimBox are primarily used in print workflows; standard screen display readers usually only use MediaBox and CropBox
- The save method must be called after modification to write changes to the file