DynaPDF.GetBBox
---------------

Queries bound box values of current page.

| Component | Version | macOS | Windows | Linux | Server | iOS SDK |
|---|---|---|---|---|---|---|
| [DynaPDF](component_DynaPDF.md) | [6.4](newinversion64.md) | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes |

MBS( "DynaPDF.GetBBox"; PDF; Box; Selector { ; Unit } ) 

**MBS**( **"DynaPDF.GetBBox";** /\* Queries bound box values of current page. \*/  
**$PDF**; /\* The PDF reference returned from [DynaPDF.New](DynaPDFNew.md). \*/   
**$Box**; /\* Which box to set. Can be Art, Bleed, Crop, Trim or Media.e.g. "Media" \*/   
**$Selector**; /\* What value to return.  
Can be Left, Right, Bottom or Top to get the coordinates.  
Can be Width and Height to get the size of page in points.  
Can be Exists to check if the given page bound exists. Returns 1 or 0.e.g. "Width" \*/   
**$Unit**) /\* Optional; The unit to return values with.  
Default is points (72 dpi raster).  
You can pass "point", "cm" or "mm".  
If an user unit is used, we include it int he calculation for meters.e.g. "point" \*/ 

### Parameters

| Parameter | Description | Example | Flags |
|---|---|---|---|
| PDF | The PDF reference returned from [DynaPDF.New](DynaPDFNew.md). | $pdf |  |
| Box | Which box to set. Can be Art, Bleed, Crop, Trim or Media. | "Media" |  |
| Selector | What value to return.   Can be Left, Right, Bottom or Top to get the coordinates.   Can be Width and Height to get the size of page in points.   Can be Exists to check if the given page bound exists. Returns 1 or 0. | "Width" |  |
| Unit | The unit to return values with.   Default is points (72 dpi raster).   You can pass "point", "cm" or "mm".   If an user unit is used, we include it int he calculation for meters. | "point" | Optional |

### Result

Returns value or error.

### Description

Queries bound box values of current page.  
This function returns a bounding box of a PDF page. A PDF page may be prepared either for a finished medium, such as a sheet of paper, or as part of a prepress process in which the content of the page is placed on an intermediate medium, such as film or an imposed reproduction plate.   
  
In the latter case, it is important to distinguish between the intermediate page and the finished page. The intermediate page may often include additional production-related content, such as bleeds or printer marks that falls outside the boundaries of the finished page. To handle such cases, a PDF page can define as many as five separate boundaries to control various aspects of the imaging process.   
  
The function requires an open page because each page can use its own boundaries. Please use [DynaPDF.EditPage](DynaPDFEditPage.md) to edit a page.  
See also [GetBBox](https://www.monkeybreadsoftware.com/DynaPDF-Manual/GetBBox.shtml) function in DynaPDF manual.

### Examples

Query with of crop box in millimeter:

 MBS ( "DynaPDF.GetBBox"; $pdf ; "crop"; "Width"; "mm")  
### See also

- [DynaPDF.EditPage](DynaPDFEditPage.md)
- [DynaPDF.GetOCG](DynaPDFGetOCG.md)
- [DynaPDF.GetPageBBox](DynaPDFGetPageBBox.md)
- [DynaPDF.GetTextBBox](DynaPDFGetTextBBox.md)
- [DynaPDF.New](DynaPDFNew.md)
- [DynaPDF.Parser.FindText](DynaPDFParserFindText.md)
- [DynaPDF.SetBBox](DynaPDFSetBBox.md)

### Example Databases

- [DynaPDF/List Pages](https://www.mbsplugins.eu/MBS-FileMaker-Plugin-Examples/DynaPDF/List%20Pages.shtml#4ScriptAnchor_)
- [DynaPDF/PDF Crop](https://www.mbsplugins.eu/MBS-FileMaker-Plugin-Examples/DynaPDF/PDF%20Crop.shtml#2ScriptAnchor_)
- [DynaPDF/Render Page](https://www.mbsplugins.eu/MBS-FileMaker-Plugin-Examples/DynaPDF/Render%20Page.shtml#4ScriptAnchor_)
- [DynaPDF/Shrink PDF pages](https://www.mbsplugins.eu/MBS-FileMaker-Plugin-Examples/DynaPDF/Shrink%20PDF%20pages.shtml#3ScriptAnchor_)

### Blog Entries

- [MBS FileMaker Plugin, version 6.4pr1](https://www.mbsplugins.de/archive/2016-07-20/MBS_FileMaker_Plugin_version_6/monkeybreadsoftware_blog_filemaker)

This function checks for a license.

Created 19th July 2016 , last changed 31st July 2016

  
[DynaPDF.GetAscent](DynaPDFGetAscent.md) - [DynaPDF.GetBidiMode](DynaPDFGetBidiMode.md)

[HTML Version](DynaPDFGetBBox.shtml)