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.GetPDFDocument

Creates a new PDF Document with the given PDF document.

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

MBS( "PDFKit.GetPDFDocument"; PDF { ; Filename } )

Parameters

Parameter Description Example value
PDF A container value with the PDF content from a media field. Or a text with an URL. Or a PDF reference from PDFKit.Open.
Filename Optional
Optionally, the file name to use for the container value.
"output.pdf"

Result

Returns a container with a PDF document. The plugin adds a JPEG picture for preview as well as a file name. You can store it in a media field.

Description

Creates a new PDF Document with the given PDF document.
Filename is optional. When you use an URL for the PDF, you can basicly load a new PDF from a server.

Examples

Save a PDF in a PDF reference into a container value:

MBS( "PDFKit.GetPDFDocument"; $ref; "test.pdf" )

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.GetPDFAttribute   -   PDFKit.GetPDFPageCount

Feedback: Report problem or ask question.




Links
MBS Xojo PDF Plugins