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:
12.1
12.2
12.3
12.4
12.5
13.0
13.1
13.2
13.3
13.4
Statistic
FMM
Blog
Adds a new page to PDF document with given image.
Component | Version | macOS | Windows | Linux | Server | iOS SDK |
PDFKit | 5.0 | ✅ Yes | ❌ No | ❌ No | ✅ Yes, on macOS | ✅ Yes |
Parameter | Description | Example | Flags |
---|---|---|---|
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 | The width for the new PDF page. | 600 | Optional |
Height | The height of the new PDF page. | 800 | Optional |
Returns OK or error.
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)]
This function checks for a license.
Created 16th February 2015, last changed 9th May 2017