Skip to content

Optional support for /AF (Associated Files) when embedding attachments #131

@gflohr

Description

@gflohr

Describe your idea

It would be useful (required in some use cases) to not only add the names of attached files to the /Names/EmbeddedFiles dictionary, but to also add it to the /AF dictionary for associated files.

How could this be implemented?

I would add an option to attach() that activates the feature.

What problem are you trying to solve?

The French/German standard for hybrid electronic invoices Factur-X aka ZUGFeRD describes how to add electronic invoices (XML) to PDF/A documents. The standard describes this as embedding the XML invoice via a File Specification Dictionary with a reference to the document, which seems to correspond to the /AF mechanism.

I'm not sure whether this is an additional requirement of Factur-X or whether it is already part of any PDF/A specification.

Why does this matter to you?

A lot of validators for electronic invoices reject documents because the /AF dictionary is missing resp. doesn't meet the expectation.

Would others find this helpful?

The package https://github.com/gflohr/e-invoice-eu is in wide use for creating electronic invoices in the EU.

Are you interested in implementing your proposal?

Yes

Why are you submitting a proposal?

Manual tests have proven that adding the file to /AF shuts up the validator errors. I also have a vague idea of how this should be implemented.

Additional Notes

Related issues:

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions