Topics   All   Mac OS X (Only)   Windows (Only)   Linux (Only, Not)   iOS (Only, Not)  
Components   Crossplatform Mac & Win   Server (Not)   Client   Old   Guides   Examples
New in version: 6.3   6.4   6.5   7.0   7.1   7.2   7.3   7.4   7.5   7.6    Statistic  

PDFKit.NewPDFDocument

Creates a new empty PDF and returns a PDF Reference value.

Component Version macOS Windows Server FileMaker Cloud FileMaker iOS SDK
PDFKit 5.0 Yes No Yes, macOS only No Yes

MBS( "PDFKit.NewPDFDocument" )

Parameters

none

Result

Returns a number for the PDF. Use PDFKit.Release later to free the memory.

Description

Creates a new empty PDF and returns a PDF Reference value.
This value can be used in other PDFKit calls to work on the same PDF.
See also PDFKit.Open.
PDF Document reference numbers are starting at 30000 and counting up for each new document.

Examples

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


PDFKit.GetPrintSetting   -   PDFKit.Open

Feedback: Report problem or ask question.




Links
MBS Xojo blog