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
10.6
Statistic
FMM
Blog
DynaPDF.ImportPDFPage
Imports a page from the import PDF and appends it to the current working PDF.
| Component | Version | macOS | Windows | Linux | Server | FileMaker iOS SDK |
| DynaPDF | 3.0 | Yes | Yes | Yes | Yes | Yes |
Parameters
| Parameter | Description | Example |
|---|---|---|
| The PDF reference returned from DynaPDF.New. | ||
| PageIndex | The source page number from 1 to DynaPDF.GetImportPageCount. | 1 |
Result
Returns OK or error message.
Description
Imports a page from the import PDF and appends it to the current working PDF.See also pdfImportPDFPage in dynapdf manual.
To open the import PDF, please use DynaPDF.OpenPDFFromFile or DynaPDF.OpenPDFFromContainer.
Requires DynaPDF Pro license.
Use DynaPDF.SetImportFlags including AllPageObjects option to preserve links.
Examples
Import a single page:
Set Variable [$r; Value: MBS( "DynaPDF.SetImportFlags"; $pdf; "ImportAll¶ImportAsPage¶AllPageObjects" )]
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)]
Split first page from a PDF:
# 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 )]
# Import one page
Set Variable [$r; Value:MBS("DynaPDF.ImportPDFPage"; $pdf; 1)]
# Write PDF
Set Variable [$r; Value:MBS("DynaPDF.Save"; $pdf)]
# release memory
Set Variable [$r1; Value:MBS("DynaPDF.Release"; $pdf)]
See also
- DynaPDF.GetImportPageCount
- DynaPDF.ImportPDFFile
- DynaPDF.Initialize
- DynaPDF.OpenOutputFile
- DynaPDF.OpenPDFFromContainer
- DynaPDF.Print
- DynaPDF.Release
- DynaPDF.RenderPage
- DynaPDF.Save
- DynaPDF.SetImportFlags
Example Databases
- DynaPDF/Apply Letter Paper to PDF
- DynaPDF/Click Points
- DynaPDF/DynaPDF Batch Preview
- DynaPDF/DynaPDF Highlight Text
- DynaPDF/DynaPDF Replace Text
- DynaPDF/DynaPDF Test
- DynaPDF/Invoice/Invoice
- DynaPDF/PDF Differences
- DynaPDF/Render Page
- DynaPDF/Swiss QRCode
Blog Entries
- Swiss QR-Codes for invoices as vector graphics
- FileMaker with ZUGFeRD 2.0 and Factur-X
- MBS FileMaker Plugin, version 9.2pr1
- Normalize PDF orientation with MBS Plugins and DynaPDF
- Introducing DynaPDF to MBS Filemaker Plugin
FileMaker Magazin
Release notes
- Version 9.2
- Improved error handling for DynaPDF.ImportPDFPage function.
Created 18th August 2014, last changed 8th May 2020
DynaPDF.ImportPDFFile - DynaPDF.ImportPageAsTemplate
Feedback: Report problem or ask question.
Links
MBS FileMaker tutorial videos