Mac OS X
Components Crossplatform Mac & Win Server Client Old Guides Examples
New in version: 7.2 7.3 7.4 7.5 8.0 8.1 8.2 8.3 8.4 8.5 Statistic
Returns the bounds for the specified PDF display box.
|Component||Version||macOS||Windows||Server||FileMaker Cloud||FileMaker iOS SDK|
|PDFKit||2.9||Yes||No||Yes, macOS only||No||Yes|
|A container value with the PDF content from a media field. Or a text with an URL. Or a PDF reference from PDFKit.Open.|
|index||The index of the page. From zero to PDFKit.GetPDFPageCount-1.||1|
Optionally, the PDF box to use. Can be Media Box = 0, Crop Box = 1, Bleed Box = 2, TrimBox = 3 or ArtBox = 4. If the box is not defined, we fall back to the media box. Default is 0.
Optionally. If you pass 1, we convert the rectangle to millimeters. Else we return points where 72 points are one inch. Default is 0.
Returns four values separated with new line containing x, y, width and height.
DescriptionReturns the bounds for the specified PDF display box.
Note that only the media box is required for a PDF. If you request the bounds for the crop box, but the PDF does not include a crop box, the bounds for the media box are returned instead. If you request the bounds for other box types, and the PDF does not includes these types, the bounds for the crop box are returned instead.
The coordinates for the box are in page space, so you might need to transform the points if the page has a rotation on it. Also, note that the bounds boundsForBox returns are intersected with the page's media box.
Get media box of third page in a PDF in a container field:
Get crop box of sixth page in millimeters in a PDF with reference:
Created 18th August 2014, last changed 16th February 2015
Feedback: Report problem or ask question.
MBS FileMaker blog