DynaPDF.SetPageBBox
-------------------

Sets or changes the bounding box of a page.

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

MBS( "DynaPDF.SetPageBBox"; PDF; PageIndex; Box; Left; Bottom; Right; Top ) 

**MBS**( **"DynaPDF.SetPageBBox";** /\* Sets or changes the bounding box of a page. \*/  
**$PDF**; /\* The PDF reference returned from [DynaPDF.New](DynaPDFNew.md). \*/   
**$PageIndex**; /\* The page index in range from 1 to [DynaPDF.GetPageCount](DynaPDFGetPageCount.md).e.g. 1 \*/   
**$Box**; /\* Optional, which box to use. Default is Mediabox. You can pass MediaBox, CropBox, ArtBox, BleedBox or TrimBox.e.g. "MediaBox" \*/   
**$Left**; /\* The left coordinate of the rectangle.e.g. 0 \*/   
**$Bottom**; /\* The bottom coordinate of the page.e.g. 0 \*/   
**$Right**; /\* The right coordinate of the page.e.g. 595 \*/   
**$Top**) /\* The top coordinate of the page.e.g. 842 \*/ 

### Parameters

| Parameter | Description | Example |
|---|---|---|
| PDF | The PDF reference returned from [DynaPDF.New](DynaPDFNew.md). | $pdf |
| PageIndex | The page index in range from 1 to [DynaPDF.GetPageCount](DynaPDFGetPageCount.md). | 1 |
| Box | Optional, which box to use. Default is Mediabox. You can pass MediaBox, CropBox, ArtBox, BleedBox or TrimBox. | "MediaBox" |
| Left | The left coordinate of the rectangle. | 0 |
| Bottom | The bottom coordinate of the page. | 0 |
| Right | The right coordinate of the page. | 595 |
| Top | The top coordinate of the page. | 842 |

### Result

Returns OK or error.

### Description

Sets or changes the bounding box of a page.   
This function is intended to be fast as possible. It requires no open page like [DynaPDF.SetBBox](DynaPDFSetBBox.md), it does not change the default media or crop box, and it does not adjust the current coordinate system if the media box will be changed.   
The function is useful if only one or more bounding boxes must be changed, without editing a page, or when a specific area of a page should be rendered. In the latter case change the crop box and restore it to the previous value when finish.   
To delete a bounding box set the bounding box to 0, 0, 0, 0.   
See also [SetPageBBox](https://www.monkeybreadsoftware.com/DynaPDF-Manual/SetPageBBox.shtml) function in DynaPDF manual.

### See also

- [DynaPDF.GetPageBBox](DynaPDFGetPageBBox.md)
- [DynaPDF.GetPageCount](DynaPDFGetPageCount.md)
- [DynaPDF.GetTextBBox](DynaPDFGetTextBBox.md)
- [DynaPDF.New](DynaPDFNew.md)
- [DynaPDF.RenderPage](DynaPDFRenderPage.md)
- [DynaPDF.SetBBox](DynaPDFSetBBox.md)
- [DynaPDF.SetFieldBBox](DynaPDFSetFieldBBox.md)
- [DynaPDF.SetPageLayout](DynaPDFSetPageLayout.md)
- [DynaPDF.SetPageMode](DynaPDFSetPageMode.md)
- [DynaPDF.SetPageWidth](DynaPDFSetPageWidth.md)

### Release notes

- **Version 8.2**
    - Added [DynaPDF.SetPageBBox](http://www.mbsplugins.eu/DynaPDFSetPageBBox.shtml) and [DynaPDF.GetUsesTransparency](http://www.mbsplugins.eu/DynaPDFGetUsesTransparency.shtml) functions.

### Blog Entries

- [MBS FileMaker Plugin, version 8.2pr6](https://www.mbsplugins.de/archive/2018-05-07/MBS_FileMaker_Plugin_version_8/monkeybreadsoftware_blog_filemaker)

This function checks for a license.

Created 4th May 2018 , last changed 4th May 2018

  
[DynaPDF.SetPDFVersion](DynaPDFSetPDFVersion.md) - [DynaPDF.SetPageBreakExpression](DynaPDFSetPageBreakExpression.md)

[HTML Version](DynaPDFSetPageBBox.shtml)