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:
9.3
9.4
9.5
10.0
10.1
10.2
10.3
10.4
10.5
11.0
Statistic
FMM
Blog
DynaPDF.OpenPDFFromContainer
Opens a PDF for importing from a container.
Component | Version | macOS | Windows | Linux | Server | FileMaker iOS SDK |
DynaPDF | 3.0 | Yes | Yes | Yes | Yes | Yes |
Parameters
Parameter | Description | Example | Flags |
---|---|---|---|
The PDF reference returned from DynaPDF.New. | |||
containerValue | The container value to use. Should contain a PDF file. | ||
PasswordType | The password type and flags. Flag kann be 1 for owner password and 0 for open password. You can combine this with 2 to force repair. | 0 | Optional |
Password | The password to decrypt the file. | $password | Optional |
Result
Returns number or error message.
Description
Opens a PDF for importing from a container.Requires DynaPDF Lite license.
On success returns a number ≥ 0.
After opening the file, please use DynaPDF.ImportPDFFile or DynaPDF.ImportPDFPage to import one or more pages. Or just check metadata with e.g. DynaPDF.GetImportDocInfo and check page count and sizes with DynaPDF.GetImportPageBounds and DynaPDF.GetImportPageCount.
Examples
Opens PDF:
$r = MBS( "DynaPDF.OpenPDFFromContainer"; $PDF; $PDFFile )
$error = MBS( "DynaPDF.GetLastErrorMessage"; $PDF )
Load PDF and extract text of page 2:
# initialize DynaPDF before running this:
Set Variable [$pdf; Value:MBS("DynaPDF.New")]
# load PDF from container
Set Variable [$r; Value:MBS("DynaPDF.OpenPDFFromContainer";$pdf; Test::data)]
# import all pages
Set Variable [$r; Value:MBS("DynaPDF.ImportPDFFile";$pdf)]
# extra text of page 2
Set Field [Test::PageText; MBS("DynaPDF.ExtractPageText"; $pdf; 2)]
#Cleanup
Set Variable [$r; Value:MBS("DynaPDF.Release"; $pdf)]
Import a single page:
Set Variable [$r; Value:MBS("DynaPDF.SetImportFlags"; $pdf; "ImportAll ImportAsPage")]
Set Variable [$r; Value:MBS("DynaPDF.OpenPDFFromContainer"; $pdf; Invoice::PDF Template)]
Set Variable [$r; Value:MBS("DynaPDF.ImportPDFPage"; $pdf; 1)]
Import selected pages from one PDF and write into a new one:
# New PDF
Set Variable [$pdf; Value:MBS("DynaPDF.New")]
# Open existing PDF file (or use DynaPDF.OpenPDFFromContainer for container)
Set Variable [$r; Value:MBS("DynaPDF.OpenPDFFromFile"; $pdf; $path )]
# Query page count
Set Variable [$pageCount; Value:MBS( "DynaPDF.GetImportPageCount"; $pdf )]
# Import the pages you need
Set Variable [$r; Value:MBS("DynaPDF.ImportPDFPage"; $pdf; 1)]
Set Variable [$r; Value:MBS("DynaPDF.ImportPDFPage"; $pdf; 2)]
Set Variable [$r; Value:MBS("DynaPDF.ImportPDFPage"; $pdf; 3)]
Set Variable [$r; Value:MBS("DynaPDF.ImportPDFPage"; $pdf; $pagecount - 1)]
Set Variable [$r; Value:MBS("DynaPDF.ImportPDFPage"; $pdf; $pagecount - 2)]
# Set output to this file path
# MBS( "DynaPDF.OpenOutputFile"; $pdf; "/Users/cs/Desktop/output.pdf" )
# Write PDF
Set Variable [$r; Value:MBS("DynaPDF.Save"; $pdf)]
# release memory
Set Variable [$r1; Value:MBS("DynaPDF.Release"; $pdf)]
See also
- DynaPDF.Print
- DynaPDF.Print.SetDevMode
- DynaPDF.RenderPage
- DynaPDF.RotateTemplate
- DynaPDF.Save
- DynaPDF.SaveAndSignFileExt
- DynaPDF.SetOrientationEx
- DynaPDF.SetUseGlobalImpFiles
- DynaPDF.WebLink
- DynaPDF.WriteFTextEx
Example Databases
- DynaPDF/Convert to PDFA
- DynaPDF/DynaPDF PlaceTemplate
- DynaPDF/List ColorSpaces
- DynaPDF/List Images
- DynaPDF/List XFA Fields
- DynaPDF/List XFA Streams
- DynaPDF/Optimize PDF
- DynaPDF/PDF JSON
- DynaPDF/Show PDF Fields
- DynaPDF/ZUGFeRD 2.0/ZUGFeRD 2.0 Invoice
Blog Entries
- Adding cutting lines for PDF in FileMaker
- Swiss QR-Codes for invoices as vector graphics
- Example Script for DynaPDF.FindText and DynaPDF.WebLink
- Merge PDF with table of contents
- Create two page PDF document in FileMaker
- FileMaker with ZUGFeRD 2.0 and Factur-X
- How to Convert a PDF document to a PDF/A
- PDF Forms with MBS Plugin
- Creating PDF/A in FileMaker with ZUGFeRD standard
- Normalize PDF orientation with MBS Plugins and DynaPDF
FileMaker Magazin
- Ausgabe 6/2020, Seite 34
- Ausgabe 6/2020, Seite 32
- Ausgabe 3/2019, Seite 37, PDF
- Ausgabe 2/2019, Seite 27, PDF
- Ausgabe 2/2019, Seite 25, PDF
- Ausgabe 1/2018, Seite 26, PDF
- Ausgabe 1/2018, Seite 25, PDF
- Ausgabe 1/2018, Seite 24, PDF
- Ausgabe 6/2017, Seite 26, PDF
- Ausgabe 6/2016, Seite 24
Created 18th August 2014, last changed 29th July 2020
DynaPDF.OpenOutputFileEncrypted - DynaPDF.OpenPDFFromFile
Feedback: Report problem or ask question.

Links
MBS Xojo Chart Plugins