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.1   6.2   6.3   6.4   6.5   7.0   7.1   7.2   7.3   7.4    Statistic  

PDFKit.OpenContainer

Opens a PDF from container value and returns a PDF Reference value.

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

MBS( "PDFKit.OpenContainer"; Container )

Parameters

Parameter Description Example value
Container A media value containing PDF data.

Result

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

Description

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

Examples

Open the PDF in the container:

MBS("PDFKit.OpenContainer"; myTable::myMediaField)

Rotate page and set title:

# open PDF from container
Set Variable [$ref; Value:MBS("PDFKit.OpenContainer"; combine pdf::result)]
# Set title for PDF
Set Variable [$result; Value:MBS("PDFKit.SetPDFAttribute"; $ref; "Title"; combine pdf::title)]
# Rotate first page by 90°
Set Variable [$result; Value:MBS("PDFKit.SetPDFPageRotation"; $ref; 0; 90)]
# save document to container
Set Field [combine pdf::result; MBS("PDFKit.GetPDFDocument"; $ref; "result.pdf")]
# free memory
Set Variable [$result; Value:MBS("PDFKit.Release"; $ref)]

See also

Example Databases


PDFKit.Open   -   PDFKit.OpenPath

Feedback: Report problem or ask question.




Links
MBS FileMaker blog