Setting ZUGFeRD level for BASIC, COMFORT, EXTENDED

73 views
Skip to first unread message

Matthias Schlosser

unread,
Mar 23, 2017, 10:30:49 AM3/23/17
to ZUGFeRD
Hi,

i want to create an invoice pdf document that supports the ZUGFeRD specification. 
I already have an "empty" PDFA file and a generated XML-file that contains the invoice data according to the ZUGFeRD specification. 
The xml file is based either on BASIC, COMFORT or EXTENDED level of ZUGFeRD specification.

For creating a ZUGFeRD invoice based on a PDFA file and a XML file i am using the method ZUGFeRDExporter#setZUGFeRDXMLData(byte[]). So far so good
The generated ZUGFeRD file contains always the ConformanceLevel COMFORT in the ZUGFeRD XMPMetadata, although ConformanceLevel in XML file  is different.

Question: Is it possible to change the ConformanceLevel of the ZUGFeRD XMPMetadata into BASIC or EXTENDED. Using ZUGFeRDExporter#setZUGFeRDConformanceLevel with arguments "BASIC" or "EXTENDED" was not successfull.

Any ideas?

Best regards 
Matthias
Mustang_COMFORT.png

Matthias Schlosser

unread,
Mar 23, 2017, 11:24:32 AM3/23/17
to ZUGFeRD
Ok, my fault

Method setZUGFeRDConformanceLevel(String) (and setConformanceLevel(String) too) must be called before method PDFmakeA3compliant(...)
Thats all.

Thanks for great Mustang!
Matthias

jochen...@gmail.com

unread,
Mar 23, 2017, 4:57:42 PM3/23/17
to ZUGFeRD
Hi,

Which version do you use/did you try it on master head?
I fixed something in order to switch to extended by default.

kind regards
Jochen


Am Donnerstag, 23. März 2017 15:30:49 UTC+1 schrieb Matthias Schlosser:

Matthias Schlosser

unread,
Mar 24, 2017, 11:48:42 AM3/24/17
to ZUGFeRD
Hi Jochen,

ok, i understand - first of all i have used mustang-1.3.1.jar. This results in COMFORT as default. Now i am using the master head and this results in EXTENDED level as default.

What would you recommend? Master head or version 1.31 - Does the master head contains further bugfixes?

Kind regards 
Matthias

Daniel Huber

unread,
Mar 29, 2017, 7:14:52 AM3/29/17
to ZUGFeRD
Hallo Matthias,
Was ist das für eine Applikation welche dü für die Anzeige des PDF/XML benutzt?  (dein Anhang...)
(What application did you use to create the attached picture?)
Daniel

Daniel Huber

unread,
Mar 29, 2017, 7:52:31 AM3/29/17
to ZUGFeRD
Found it, never mind. Acrobat Pro, Print Production Tool..

Anyway, still a question (from a non-experiences Jave newbie..
If I create a BASIC profile, how exactly do I set the metadata correctly for the output PDF file?

setZUGFeRDConformanceLevel("BASIC)
setConformanceLevel("BASIC)

???

Thanks
Daniel

Matthias Schlosser

unread,
Mar 29, 2017, 8:05:06 AM3/29/17
to ZUGFeRD
Hi Daniel,

zum Setzen des ZUGFeRD-Levels verwendest Du setZUGFeRDConformanceLevel(String level)   (level = BASIC, COMFORT, EXTENDED)
Die Methode setConformanceLevel(String pdfLevel) (pdfLevel = "U", "A", "B") ändert das generierte Pdf-Format, im Default "U" -> Pdf/A-3U. Theoretisch ist somit das Ändern auf Pdf/A-3A oder Pdf/A-3B möglich.
Beide Methoden müssen vor PDFmakeA3compliant(...) aufgerufen werden.

Viel Erfolg
Matthias

Daniel Huber

unread,
Mar 29, 2017, 8:11:09 AM3/29/17
to ZUGFeRD
Ui das ging ja schnell wie der Blitz!! Wow!

Also muss ich nur das Folgende benutzen?

setZUGFeRDConformanceLevel("BASIC");

Korrekt?

Danke

Matthias Schlosser

unread,
Mar 29, 2017, 12:28:54 PM3/29/17
to ZUGFeRD
Korrekt ;-)

Daniel Huber

unread,
Mar 29, 2017, 2:25:33 PM3/29/17
to ZUGFeRD
Kuhl... und es funktioniert..
Vielen Herzlichen Dank!

Ah, wenn ich dich grad dran hab, hast du per Zufall auch die andere Frage gesehen die ich in das Forum gestellt habe? 


Daniel

Reply all
Reply to author
Forward
0 new messages