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

DynaPDF.AssociateEmbFile

Associates an embedded file with a PDF object.

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

MBS( "DynaPDF.AssociateEmbFile"; PDF; DestObject; DestHandle; Relationship; EmbFile )

Parameters

Parameter Description Example value
PDF The PDF reference returned from DynaPDF.New. $pdf
DestObject The destination object type.
Can be Annotation, Catalog, Field, Image, Page or Template.
"Annotation"
DestHandle The destination object handle or -1. -1
Relationship The relationship for the object to its parent.
Can be Associated, Data, Source, Supplement or Alternative.
The value Alternative must be used for ZUGFeRD compatible invoices.
"Alternative"
EmbFile Handle of an embedded file.

Result

Returns OK or error.

Description

Associates an embedded file with a PDF object.
The parameter DestHandle must be a valid handle of a PDF object. If destination object type is a page, then the page number must be used as handle. The first page is denoted by one. If the destination object is the documents catalog then the parameter DestHandle is ignored. Set the parameter to zero or -1 in this case.
The parameter EmbFile must be a valid handle of an embedded file. See DynaPDF.AttachFile or AttachFile for further information.
Associated files are supported since PDF 2.0 and in PDF/A 3 files. In PDF/A 3 files all embedded files must be associated with a PDF object.

Examples

Add ZUGFeRD invoice xml file:

Set Variable [$FileHandle; Value:MBS("DynaPDF.AttachFileText"; $pdf; ZUGFeRD Invoice::Invoice XML; "UTF-8"; "ZUGFeRD-invoice.xml"; "Invoice as XML")]
Set Variable [$r; Value:MBS("DynaPDF.AssociateEmbFile"; $pdf; "Catalog"; -1; "Alternative"; $FileHandle)]

See also


DynaPDF.AppendPage   -   DynaPDF.AttachFile

Feedback: Report problem or ask question.




Links
MBS REAL studio tutorial videos - Bilder aus Nickenich