How to specify the kind of relation on AddFileAttachment method ?

  • About use cases, i think it could enable the generation of many kind of file format based on pdf/a, not just some specific profile of factur-X.

    The pdf/a specifications about associated files (…ote-002-associated-files/) explains in Chapter 3

    "an AFRelationship entry in the file specification dictionary specifying the nature of

    the relationship between the PDF (or a PDF object), and the related content. This

    entry is required to contain one of the values defined in PDF 2.0: Source, Data,

    Alternative, Supplement, EncryptedPayload, FormData, Schema or Unspecified.

    Custom values may be used where none of these entries is appropriate."

    As it is possible to specify custom values, text seems to be a good choice.

    As an example, the Order-X specifications ( could embed additional documents, not only the main order-x*.xml. And those additional attachments must have Supplement or Unspecified relationship.

    "Generating Order-X PDF instance

    4.1.1 Embedding the XML file

    The order data in the XML format is embedded using a file specification dictionary. In order to do

    this, a valid MIME type must be specified for the document to be embedded. The MIME type for

    Order-X is always text/xml.

    The embedded file’s stream dictionary should contain a Params key. Params refers to a dictionary

    containing at least a ModDate indicating the last modification date of the embedded file.

    The embedded document must also be included in the Names object tree so as to enable compliant

    PDF tools to represent the file together with additional information.

    As a basic principle, several files can be embedded in the PDF/A-3 document, thereby enabling

    information documents relating to the order check to be packaged together with the order data

    document in the PDF/A-3. To identify, at PDF level, which of the embedded files is the order data

    document, the name of the order data document must be included in the corresponding metadata


    The XML file is always embedded with the name order-x.xml.

    There is also the option to embed other documents supporting the order as additional files, including

    complementary representations of the order data in other formats (for instance EDIFACT). The name

    of a complementary representation of the order must be:

    • For an EDIFACT representation: order-xedifact.edi.

    • For a UBL representation: order-xubl.xml.

    The Data relationship must be:

    •For order-x.xml : Data, Source or Alternative

    •For other documents attached, including complementary representations: Supplement or