Topics   All   Mac OS X (Only)   Windows (Only)   Linux (Only, Not)   Crossplatform   Server (Not)   Client   Components   Old   Guides
New in version: 5.0   5.1   5.2   5.3   5.4   6.0   6.1   6.2   6.3   6.4   6.5   7.0   7.1    Statistic  

DynaPDF.ImportPDFPage

Imports a page from the import PDF and appends it to the current working PDF.

Component: DynaPDF
Version: 3.0
Mac OS X: Yes
Windows: Yes
Server: Yes
FileMaker Cloud: Yes

MBS( "DynaPDF.ImportPDFPage"; PDF; PageIndex )

Parameters

Parameter Description Example value
PDF The PDF reference returned from DynaPDF.New. $pdf
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.

Examples

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.ImportPDFFile   -   DynaPDF.ImportPageAsTemplate

Feedback: Report problem or ask question.




Links
MBS Realbasic Plugins - Christians Software aus Nickenich