| Components | All | New | MacOS | Windows | Linux | iOS | ||||
| Examples | Mac & Win | Server | Client | Guides | Statistic | FMM | Blog | Deprecated | Old | |
WinPDF.PageBox
Queries page dimensions.
| Component | Version | macOS | Windows | Linux | Server | iOS SDK |
| WinPDF | 13.2 | ❌ No | ✅ Yes | ❌ No | ✅ Yes, on Windows | ❌ No |
MBS( "WinPDF.PageBox"; PDFRef; Page; Box ) More
Parameters
| Parameter | Description | Example |
|---|---|---|
| PDFRef | The reference number for the PDF document. | |
| Page | The page index. Zero based. |
0 |
| Box | Which box to use to query page size. Can be ArtBox, BleedBox, CropBox, MediaBox, or TrimBox. |
"MediaBox" |
Result
Returns list or error.
Description
Queries page dimensions.Returns a list with values for X, Y, Width and Height.
Sizes are reported in points @ 72 dpi.
Examples
Query all page sizes:
Set Variable [ $page ; Value: 0 ]
Set Variable [ $ArtBox ; Value: MBS( "WinPDF.PageBox"; $pdf; $page; "ArtBox") ]
Set Variable [ $BleedBox ; Value: MBS( "WinPDF.PageBox"; $pdf; $page; "BleedBox") ]
Set Variable [ $CropBox ; Value: MBS( "WinPDF.PageBox"; $pdf; $page; "CropBox") ]
Set Variable [ $MediaBox ; Value: MBS( "WinPDF.PageBox"; $pdf; $page; "MediaBox") ]
Set Variable [ $TrimBox ; Value: MBS( "WinPDF.PageBox"; $pdf; $page; "TrimBox") ]
Set Variable [ $ArtBox ; Value: MBS( "WinPDF.PageBox"; $pdf; $page; "ArtBox") ]
Set Variable [ $BleedBox ; Value: MBS( "WinPDF.PageBox"; $pdf; $page; "BleedBox") ]
Set Variable [ $CropBox ; Value: MBS( "WinPDF.PageBox"; $pdf; $page; "CropBox") ]
Set Variable [ $MediaBox ; Value: MBS( "WinPDF.PageBox"; $pdf; $page; "MediaBox") ]
Set Variable [ $TrimBox ; Value: MBS( "WinPDF.PageBox"; $pdf; $page; "TrimBox") ]
See also
Blog Entries
Created 8th March 2023, last changed 16th April 2023