Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to add a file into the PDF, without adding annotation? #578

Open
thierryler opened this issue Dec 29, 2022 · 6 comments
Open

How to add a file into the PDF, without adding annotation? #578

thierryler opened this issue Dec 29, 2022 · 6 comments

Comments

@thierryler
Copy link

Hello,

To create an invoice, using the factur-x format, I need to embed an XML file into the PDF. The only way, i've founded was to add an annotation:

$pdf->Annotation(0,0,0,0, 'invoice', array(
    'Subtype' => 'FileAttachment', 
    'Name'    => 'PushPin', 
    'FS'      => 'factur-x.xml'
));

But:

  1. that adds an useless annotation
  2. the file appears twice (in the file list) when I open the PDF with Accrobat Reader

Is there a way to simply add the file, without annotation?

Thx
Th.

@williamdes
Copy link
Contributor

Can you provide a validation tool for this format?
And share specs for this format?
I honestly do not know the answer to your question but may have a look if the spec about this format is interesting :)

@thierryler
Copy link
Author

Hello,

The factur-x format is the new format for invoices. It will be required in France and Germany in 2024.

In factur-x, you have your standard PDF and an xml file embeded.

You can find specification here : http://fnfe-mpe.org/factur-x/

But the question is actually not only for factur-x. It about how to add a file into the PDF, not using anotations.

Here is a screen capture. You can see that the xml file is included twice. And that also adds a useless anotation.

Capture d’écran 2022-12-29 à 14 10 36

@williamdes
Copy link
Contributor

williamdes commented Dec 29, 2022

Thanks, I am in France, that's good to know

Sure I understood that the issue is about embedding a file in the pdf

@thierryler
Copy link
Author

@williamdes Je suis beta testeur pour la facture électronique. Elle sera obligatoire pour les grandes entreprises en 2024, mais par extension, toutes les petites entreprises qui achètent ou vendent avec les grosses vont devoir s'y mettre aussi. Et ça promet d'être un beau bazar...

The org also referencies this lib https://github.com/atgp/factur-x which allow to merge a PDF with a xml file.

@williamdes
Copy link
Contributor

@williamdes Je suis beta testeur pour la facture électronique. Elle sera obligatoire pour les grandes entreprises en 2024, mais par extension, toutes les petites entreprises qui achètent ou vendent avec les grosses vont devoir s'y mettre aussi. Et ça promet d'être un beau bazar...

The org also referencies this lib https://github.com/atgp/factur-x which allow to merge a PDF with a xml file.

Oui hihihi, déjà les clients disent que c'est pas pressé
On est pas sorti de ce bordel..

Essayons d'être en avance cette fois ci

@williamdes
Copy link
Contributor

Via dompdf y a du progrès !
dompdf/dompdf#3443

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants