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 |
Usage notes
- CropBox 须被 MediaBox 完全包含,否则打印或显示时可能产生裁剪异常
- 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