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.4   6.5   7.0   7.1   7.2   7.3   7.4   7.5   8.0   8.1    Statistic  


Associates an embedded file with a PDF object.

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

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


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.
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.
EmbFile Handle of an embedded file.


Returns OK or error.


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.

See also AssociateEmbFile function in DynaPDF manual.


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

Example Databases

DynaPDF.AppendPage   -   DynaPDF.AttachFile

Feedback: Report problem or ask question.

MBS FileMaker Plugins