WinPDF.PageBox
--------------

Queries page dimensions.

| Component | Version | macOS | Windows | Linux | Server | iOS SDK |
|---|---|---|---|---|---|---|
| [WinPDF](component_WinPDF.md) | [13.2](newinversion132.md) | ❌ No | ✅ Yes | ❌ No | ✅ Yes, on Windows | ❌ No |

MBS( "WinPDF.PageBox"; PDFRef; Page; Box ) 

**MBS**( **"WinPDF.PageBox";** /\* Queries page dimensions. \*/  
**$PDFRef**; /\* The reference number for the PDF document.e.g. $PDF \*/   
**$Page**; /\* The page index.  
Zero based.e.g. 0 \*/   
**$Box**) /\* Which box to use to query page size.  
Can be ArtBox, BleedBox, CropBox, MediaBox, or TrimBox.e.g. "MediaBox" \*/ 

### Parameters

| Parameter | Description | Example |
|---|---|---|
| PDFRef | The reference number for the PDF document. | $PDF |
| 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") \]  
### See also

- [WinPDF.PageCount](WinPDFPageCount.md)

### Blog Entries

- [New in MBS FileMaker Plugin 13.2](https://www.mbsplugins.de/archive/2023-05-17/New_in_MBS_FileMaker_Plugin_13/monkeybreadsoftware_blog_filemaker)
- [Windows PDF Functions](https://www.mbsplugins.de/archive/2023-04-11/Windows_PDF_Functions/monkeybreadsoftware_blog_filemaker)

Created 8th March 2023 , last changed 16th April 2023

  
[WinPDF.LoadFile](WinPDFLoadFile.md) - [WinPDF.PageCount](WinPDFPageCount.md)

[HTML Version](WinPDFPageBox.shtml)