| Components | All | New | MacOS | Windows | Linux | iOS | ||||
| Examples | Mac & Win | Server | Client | Guides | Statistic | FMM | Blog | Deprecated | Old | |
PDFKit.OpenContainer
Opens a PDF from container value and returns a PDF Reference value.
| Component | Version | macOS | Windows | Linux | Server | iOS SDK |
| PDFKit | 2.3 | ✅ Yes | ❌ No | ❌ No | ✅ Yes, on macOS | ✅ Yes |
MBS( "PDFKit.OpenContainer"; Container { ; Password } ) More
Parameters
| Parameter | Description | Example | Flags |
|---|---|---|---|
| Container | A media value containing PDF data. | ||
| Password | The password to use for unlocking the PDF. | Optional Added in version 16.5. |
Result
Returns a number for the PDF.
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.
Use PDFKit.Release later to free the memory.
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)]
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
- PDFKit.allowsCopying
- PDFKit.allowsPrinting
- PDFKit.AppendPages
- PDFKit.GetPDFDocument
- PDFKit.OpenPath
- PDFKit.OpenURL
- PDFKit.SetPDFAttribute
- PDFKit.SetPDFPageDisplayAnnotation
- PDFKit.SetPDFPageRotation
- PDFKit.Watermark
Release notes
- Version 16.5
- Added password parameter for PDFKit.Open, PDFKit.OpenContainer, PDFKit.OpenPath and PDFKit.OpenURL function.
Example Databases
- Barcode/Barcodes from Invoices
- Mac and iOS/PDFKit/Combine PDFs
- Mac and iOS/PDFKit/Encrypt PDF
- Mac and iOS/PDFKit/Merge PDF
- Mac and iOS/PDFKit/PDF Merge Shrink Tool
- Mac and iOS/PDFKit/PDFKit Page Selector
- Mac and iOS/PDFKit/PDFKit Print Documents
- Mac and iOS/PDFKit/PDFKit Print
- Mac and iOS/PDFKit/Watermark PDF Page
Blog Entries
- MBS FileMaker Plugin, version 16.5pr5
- Controlled printing for iOS in FileMaker
- PDFKit on iOS for MBS FileMaker Plugin
FileMaker Magazin
This function checks for a license.
Created 18th August 2014, last changed 3th November 2026
MarkDown version: PDFKitOpenContainer.md