Topics   All   MacOS (Only)   Windows (Only)   Linux (Only, Not)   iOS (Only, Not)  
Components   Crossplatform Mac & Win   Server   Client   Old   Deprecated   Guides   Examples   Videos
New in version: 9.1   9.2   9.3   9.4   9.5   10.0   10.1   10.2   10.3   10.4    Statistic  


Adds a new page to PDF document with given image.

Component Version macOS Windows Server FileMaker Cloud FileMaker iOS SDK
PDFKit 5.0 Yes No Yes, macOS only No Yes
MBS( "PDFKit.AddImagePage"; PDF; Image { ; Width; Height } )   More


Parameter Description Example value
PDF A PDF reference number from PDFKit.Open. $ref
Image The image to use. Pass a container value with JPEG, TIFF, PNG or other image formats. $image
Width Optional
The width for the new PDF page.
Height Optional
The height of the new PDF page.


Returns OK or error.


Adds a new page to PDF document with given image.
If you need more control about details, you may want to check DynaPDF functions.
Please use PDFKit.AddImageFilePage to add image file on disk.

Your changes are only done in memory, so please remember to write modified pdf back to disk, e.g. by using PDFKit.WriteToPath. Or use PDFKit.GetPDFDocument to get a PDF for storing in a container.


Create PDF from images:

# Start new document
Set Variable [$doc; Value:MBS("PDFKit.NewPDFDocument")]
# Add image in full size as new page
Set Variable [$r; Value:MBS("PDFKit.AddImagePage"; $doc; test::image)]
# Add empty page in default size
Set Variable [$r; Value:MBS("PDFKit.AddEmptyPage"; $doc)]
# Add image in given size as new page:
Set Variable [$r; Value:MBS("PDFKit.AddImagePage"; $doc; test::image; 400; 300)]
# get PDF document and store in container:
Set Field [test::test; MBS("PDFKit.GetPDFDocument"; $doc)]
# release memory
Set Variable [$r; Value:MBS("PDFKit.Release"; $doc)]

See also

Example Databases

Blog Entries

Release notes

Created 16th February 2015, last changed 9th May 2017

PDFKit.AddImageFilePage   -   PDFKit.AppendPages

Feedback: Report problem or ask question.

MBS FileMaker Plugins