ZUGFeRD Format - PDF with attached XML-File

A forum for questions or concerns related to the PDF-XChange Core API SDK

Moderators: TrackerSupp-Daniel, Tracker Support, Vasyl-Tracker Dev Team, Chris - Tracker Supp, Sean - Tracker, Tracker Supp-Stefan

Forum rules
DO NOT post your license/serial key, or your activation code - these forums, and all posts within, are public and we will be forced to immediately deactivate your license.

When experiencing some errors, use the IAUX_Inst::FormatHRESULT method to see their description and include it in your post along with the error code.
Post Reply
ese_zeta
User
Posts: 2
Joined: Mon Sep 04, 2017 12:22 pm

ZUGFeRD Format - PDF with attached XML-File

Post by ese_zeta »

Hi,
we need to create ZUGFeRD-Files. ZUGFeRD is a format for electronic invoices. It is based upon PDF/A-3 with an attached XML-file. The PDF-File contains the visible invoice data which can be displayed on a screen or be printed. The attached XML-file contains all invoice data in a structured XML form. The XML is used for automated invoice processing. There is a specification on http://www.ferd-net.de where it is described, where and how the XML-file needs to be attached to the PDF-file. Is any of your SDKs capable of manipulating the PDF after the print, to attach the XML on a defined place within the PDF.

Thanks in advance...
User avatar
Tracker Supp-Stefan
Site Admin
Posts: 17824
Joined: Mon Jan 12, 2009 8:07 am
Location: London
Contact:

Re: ZUGFeRD Format - PDF with attached XML-File

Post by Tracker Supp-Stefan »

Hello ese_zeta,

Thanks for the post and enquiry.
I've passed the sample file you e-mailed us to my colleagues to take a look at and investigate if our Core API SDK will be able to create exactly the needed file format for you!

Regards,
Stefan
User avatar
Tracker Supp-Stefan
Site Admin
Posts: 17824
Joined: Mon Jan 12, 2009 8:07 am
Location: London
Contact:

Re: ZUGFeRD Format - PDF with attached XML-File

Post by Tracker Supp-Stefan »

Hello ese_zeta,

I received a response from one of my colleagues, so here it is:
Seems like the Core API should handle that, except that it might block the modification of PDF/A files.
As a workaround, a PDF/A document can be opened, the PDF/A marker removed, then the required XML file embedded into the document, and finally the PDF/A marker restored.
Not yet 100% sure all required API is published and documented, but even if not, it will be easy to add.


Regards,
Stefan
ese_zeta
User
Posts: 2
Joined: Mon Sep 04, 2017 12:22 pm

Re: ZUGFeRD Format - PDF with attached XML-File

Post by ese_zeta »

Hello Stefan,

thank you for your effort.
To be sure that I have understood you well, I have aditional questions:

- The manipulation of the PDF will be done after the printing and creating of the PDF: That means you first print the PDF with PDF-XChange and than my application would attach the XML?
- The unsetting and setting of the PDF/A marker can be done without any user interaction?
- I did not understand well your last sentence: the API documentation is already available?

Best regards,
Sebastian
User avatar
Tracker Supp-Stefan
Site Admin
Posts: 17824
Joined: Mon Jan 12, 2009 8:07 am
Location: London
Contact:

Re: ZUGFeRD Format - PDF with attached XML-File

Post by Tracker Supp-Stefan »

Hello Sebastian,

If you want you can use only the Core API to build the PDF file from the ground up - but depending what will be providing the data indeed "printing" first might be easier.
The removal of the PDF/A flag, insertion of the XML data, and adding the PDF/A flag again is all done in the Core API without any user interaction.
The Core API documentation is there, but the methods needed to achieve the above points might not have yet been documented.

Regards,
Stefan
apx
User
Posts: 25
Joined: Tue Sep 12, 2017 1:43 pm

Re: ZUGFeRD Format - PDF with attached XML-File

Post by apx »

We are also looking for a way to support the ZUGFeRD format.
A code snippet in c# or vb.net how we can
  • Remove/add the PDF/A Flag
  • Add/extract an file as Attachment
  • Add/extract XMP Metadata
would be nice. I think there will be many other German developers who are looking for a suitable solution.

Greetings
Alex
Sasha - Tracker Dev Team
User
Posts: 5522
Joined: Fri Nov 21, 2014 8:27 am
Contact:

Re: ZUGFeRD Format - PDF with attached XML-File

Post by Sasha - Tracker Dev Team »

Hello Sebastian,

Please use the forums/wiki search first - plenty of answers there.
To get/set the metadata of the document use this https://sdkhelp.pdf-xchange.com/vie ... MPMetadata.
As for the attachments - check this:
https://www.pdf-xchange.com/forum3 ... eddedFiles

Cheers,
Alex
Subscribe at:
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
Post Reply