DynaPDF Manual - Page 165

Previous Page 164   Index   Next Page 166

Function Reference
Page 165 of 839
AssociateEmbFile
Syntax :
LBOOL pdfAssociateEmbFile(
const PPDF* IPDF,
// Instance pointer
TAFDestObject DestObject,
// Destination object type (see below)
SI32 DestHandle,
// Destination object handle or -1
TAFRelationship Relationship, // see below
UI32 EmbFile)
// Handle of an embedded file
typedef enum
{
arAssociated,
arData,
arSource,
arSupplement,
arAlternative // This key must be used for ZUGFeRD compatible invoices
}TAFRelationship;
typedef enum
{
adAnnotation,
adCatalog,
// The documents catalog is the root object
adField,
adImage,
adPage,
adTemplate
}TAFDestObject;
The function 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 AttachFile() or
AttachFileEx() for further information.
Remarks:
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.
Return values:
If the function succeeds the return value is 1. If the function fails the return value is 0.
 

Previous topic: ApplyShading

Next topic: AttachFile, AttachFileEx