Debenu Quick PDF logo


Document properties

Version history

This function was introduced in Quick PDF Library version 13.12.


Embeds a file into the PDF document and creates a file attachment link to the embedded file. The file can then be accessed in Acrobat under the File Attachments function.

A file relationship setting is also added to the embedded file according to the PDF/A-3 specification.

Set the Options parameter to 1 to embed a ZUGFeRD XML file. This will embed the invoice data and also set up the document correctly according to the ZUGFeRD specification.



function TDebenuPDFLibrary1511.EmbedRelatedFile(Title, FileName, MIMEType, 
  AFRelationship: WideString; Options: Integer): Integer;


Function DebenuPDFLibrary1511.PDFLibrary::EmbedRelatedFile(Title As String,
  FileName As String, MIMEType As String, AFRelationship As String,
  Options As Long) As Long


int DPLEmbedRelatedFile(int InstanceID, wchar_t * Title, wchar_t * FileName,
  wchar_t * MIMEType, wchar_t * AFRelationship, int Options)


Title A unique title for this file. No two files can have the same title. If a file with this title already exists in the document the new file will not be embedded.
FileName The full path and name of the file to embed.
MIMEType The optional MIME type of the file, for example "text/xml" for an XML file. See for a full list of MIME types. If the MIME type is not known it can be set to an empty string.
AFRelationship The relationship between the embedded file and the document. Can be one of "Data", "Source", "Alternative", "Supplement" or "Unspecified".
Options 0 = Regular embedding
1 = ZUGFeRD mode

Return values

0 The file could not be embedded
1 The file was embedded successfully

Copyright © 2014 Debenu. All rights reserved. AboutContactBlogNewsletterSupport