GetPageBox
Page properties
Description
Returns the dimensions of the selected page's boundary rectangles. The MediaBox represents the physical medium of the page
The CropBox represents the visible region of the page, the contents will be clipped to this region. The BleedBox is similar to the CropBox, but is the rectangle used in a production environment
The TrimBox indicates the intended dimensions of the finished page after trimming, and the ArtBox defines the extent of the page's meaningful content as intended by the page's creator
If the document does not have a CropBox but it does have a MediaBox then the CropBox will be the same as the MediaBox. If the document does not have any of the other boxes this function will return the values from the CropBox
MediaBox and CropBox may be inherited from a parent page-tree node. BleedBox, TrimBox and ArtBox belong to the page itself and are never inherited; when absent, their effective dimensions default to the effective CropBox
Syntax
Delphi
Function TPDFlib.GetPageBox(BoxType, Dimension: Integer): Double;
ActiveX
Function PDFlib::GetPageBox(BoxType As Long, Dimension As Long) As Double
DLL
double DLGetPageBox(int InstanceID, int BoxType, int Dimension);
Parameters
| BoxType | 1 = MediaBox 2 = CropBox 3 = BleedBox 4 = TrimBox 5 = ArtBox |
|---|---|
| Dimension | 0 = Left 1 = Top 2 = Width 3 = Height 4 = Right 5 = Bottom |