Topics   All   Mac OS X (Only)   Windows (Only)   Linux (Only, Not)   iOS (Only, Not)  
Components   Crossplatform Mac & Win   Server (Not)   Client   Old   Guides   Examples
New in version: 6.2   6.3   6.4   6.5   7.0   7.1   7.2   7.3   7.4   7.5    Statistic  

DynaPDF.OpenOutputFile

The function opens the output file into which the PDF file should be written.

Component Version macOS Windows Server FileMaker Cloud FileMaker iOS SDK
DynaPDF 3.3 Yes Yes Yes Yes Yes

MBS( "DynaPDF.OpenOutputFile"; PDF; Path )

Parameters

Parameter Description Example value
PDF The PDF reference returned from DynaPDF.New. $pdf
Path The file path to create the PDF.
The file name should include pdf file extension.
"C:\Test.pdf"

Result

Returns OK on success.

Description

The function opens the output file into which the PDF file should be written.
The PDF file must be created in memory if this function should be used. This is the case if you called DynaPDF.New without a file path.
It is strongly recommended to check with DynaPDF.HaveOpenDocument whether a PDF file is still in memory before calling this function.

See also OpenOutputFile function in DynaPDF manual.

Examples

Adds three picture pages:

Set Variable [$r; Value:MBS( "DynaPDF.AppendImagePages"; $pdf; "/Users/cs/Desktop/Auto2.JPG¶/Users/cs/Desktop/Auto4.JPG¶/Users/cs/Desktop/Auto1.JPG" )]

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

Example Databases


DynaPDF.New   -   DynaPDF.OpenOutputFileEncrypted

Feedback: Report problem or ask question.




Links
MBS Xojo PDF Plugins