Components | All | New | MacOS | Windows | Linux | iOS | ||||
Examples | Mac & Win | Server | Client | Guides | Statistic | FMM | Blog | Deprecated | Old |
Imports all pages from a file.
Component | Version | macOS | Windows | Linux | Server | iOS SDK |
DynaPDF | 3.0 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes |
Parameter | Description | Example | Flags |
---|---|---|---|
The PDF reference returned from DynaPDF.New. | |||
DestPage | The first number of the first imported page. Use this to insert pages at some position in new PDF. Default is 1. You may also just pass DynaPDF.GetPageCount+1 to append. |
1 | Optional |
ScaleX | Available in MBS FileMaker Plugin 13.0 or newer. The scale factor for x coordinate. Default is 1.0. |
1.0 | Optional |
ScaleY | Available in MBS FileMaker Plugin 13.0 or newer. The scale factor for y coordinate. Default is 1.0. |
1.0 | Optional |
Returns error message or last page number.
See also ImportPDFFile function in DynaPDF manual.
Imports all pages from import PDF and put in current PDF starting at page 5
$r = MBS( "DynaPDF.ImportPDFFile"; $PDF; 5 )
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 and Export PDF:
# Start new PDF
Set Variable [$pdf; Value:MBS("DynaPDF.New")]
# set import flags
Set Variable [$r; Value:MBS( "DynaPDF.SetImportFlags"; $pdf; "ImportAll ImportAsPage PrepareForPDFA" )]
Set Variable [$r; Value:MBS( "DynaPDF.SetImportFlags2"; $pdf; "DuplicateCheck" )]
# Import PDF from container
Set Variable [$r; Value:MBS("DynaPDF.OpenPDFFromContainer"; $pdf; MyTable::InputPDF)]
Set Variable [$r; Value:MBS("DynaPDF.ImportPDFFile"; $pdf; 1)]
# Save back
Set Field [MyTable::OutputPDF; MBS("DynaPDF.Save"; $pdf; "Merged.pdf")]
Set Variable [$r; Value:MBS("DynaPDF.Release"; $pdf)]
This function checks for a license.
Created 18th August 2014, last changed 9th December 2022