Combine PDF and XML to an E-Invoice PDF (ZUGFeRD)  SOLVED

PDF-XChange Editor SDK for Developers

Moderators: TrackerSupp-Daniel, Tracker Support, Paul - Tracker Supp, Vasyl-Tracker Dev Team, Chris - Tracker Supp, Sean - Tracker, Ivan - Tracker Software, 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
Fanski
User
Posts: 33
Joined: Tue Apr 17, 2012 10:33 am

Combine PDF and XML to an E-Invoice PDF (ZUGFeRD)

Post by Fanski »

What I need is to add an existing xml file to an existing PDF/A-3 and add the XMP Metadata:

urn:ferd:pdfa:CrossIndustryDocument:invoice:1p0#
zf:ConformanceLevel: BASIC
zf:DocumentFileName: ZUGFeRD-invoice.xml
zf:DocumentType: INVOICE
zf:Version: 1.0

The result should be an e-invoice PDF like that in the attachment
ZUGFeRD_1p0_BASIC_Einfach.pdf
(85.83 KiB) Downloaded 76 times
.
If its possible, could you help me with some examples?

kind regards
Peter
Sasha - Tracker Dev Team
User
Posts: 5522
Joined: Fri Nov 21, 2014 8:27 am
Contact:

Re: Combine PDF and XML to an E-Invoice PDF (ZUGFeRD)

Post by Sasha - Tracker Dev Team »

Hello Peter,

Forwarded this to the developer who can tell more.

Cheers,
Alex
Subscribe at:
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
Fanski
User
Posts: 33
Joined: Tue Apr 17, 2012 10:33 am

Re: Combine PDF and XML to an E-Invoice PDF (ZUGFeRD)

Post by Fanski »

Hi Alex,

news on this topic?

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

Re: Combine PDF and XML to an E-Invoice PDF (ZUGFeRD)

Post by Tracker Supp-Stefan »

Hello Peter,

We are still awaiting the feedback from the correct developer, and as soon as we have it - we will post it here!

Regards,
Stefan
Fanski
User
Posts: 33
Joined: Tue Apr 17, 2012 10:33 am

Re: Combine PDF and XML to an E-Invoice PDF (ZUGFeRD)

Post by Fanski »

Hi Stefan,

The first step i need, is to add an attachment (file) to the PDF programmatically (very easy to do with the PDF XChange Editor GUI). Maybe you could help me with this without the developer? Sorry about asking again, but I need a solution in the next days for the attachment problem. For adding the XMP Metadata I have a workaround if that’s the problem.

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

Re: Combine PDF and XML to an E-Invoice PDF (ZUGFeRD)

Post by Sasha - Tracker Dev Team »

Hello Peter,

Got a response about the XML\XMP. The Editor itself cannot import the data from the XML, but, if you can parse the XML yourself, then you can easily get the needed data and paste in into the needed fields manually. This interface should prove useful:
https://sdkhelp.pdf-xchange.com/vi ... MPMetadata

As for the attachment adding - there is a sample on that one here:
https://sdkhelp.pdf-xchange.com/vi ... hments_add

Cheers,
Alex
Subscribe at:
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
Fanski
User
Posts: 33
Joined: Tue Apr 17, 2012 10:33 am

Re: Combine PDF and XML to an E-Invoice PDF (ZUGFeRD)

Post by Fanski »

Hi Alex,
thank you. Adding the attachment to PDF works fine :)
For the XMP metadata I use a workaround at the moment, will try your way later.
I have one question left.
To get an PDFXEdit.IPXV_Document I initialize a AxPXV_Control on a Form (I need to show the form) and open the pdf (axPxvControl.OpenDocFromPath). Is it possible to open a pdf document for adding a attachment without showing the AxPXV_Control?

Kind regards
Peter
Sasha - Tracker Dev Team
User
Posts: 5522
Joined: Fri Nov 21, 2014 8:27 am
Contact:

Re: Combine PDF and XML to an E-Invoice PDF (ZUGFeRD)  SOLVED

Post by Sasha - Tracker Dev Team »

Hello Peter,

Of course, you can just use the IPXC (Core) level to open the IPXC_Document, add attachment to it and save it for example (or open it in the IPXV_Control if needed by passing the interface into the Open method on the IPXV level).
Check out the CoreAPI demo for the Core level training - it holds many samples:
https://github.com/tracker-software/PDFCoreSDKExamples

Cheers,
Alex
Subscribe at:
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
Fanski
User
Posts: 33
Joined: Tue Apr 17, 2012 10:33 am

Re: Combine PDF and XML to an E-Invoice PDF (ZUGFeRD)

Post by Fanski »

Hi Alex,
Thank you for your Help.
I managed it with your help.

Kind regards
Peter
Sasha - Tracker Dev Team
User
Posts: 5522
Joined: Fri Nov 21, 2014 8:27 am
Contact:

Re: Combine PDF and XML to an E-Invoice PDF (ZUGFeRD)

Post by Sasha - Tracker Dev Team »

:)
Subscribe at:
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
Post Reply