Dies ist eine alte Version des Dokuments!
Ich gehe in dem Beispiel davon aus, dass Du Deine Rechnung als XML-Datei und als PDF schon erzeugt hast. Die Dateien heißen hier 70396a.xml
und 70396a.xml
.
braucht aktuell (2024-12-08) „latest“-Version von Ghostscript:
./ghostscript-10.04.0/bin/gs \\ -sDEVICE=pdfwrite \\ -dPDFA=3 \\ -sColorConversionStrategy=RGB \\ -sZUGFeRDXMLFile=70396a.xml \\ -sZUGFeRDProfile=./ghostscript-10.04.0/iccprofiles/default_rgb.icc \\ -sZUGFeRDVersion=2p1 \\ -sZUGFeRDConformanceLevel=XRECHNUNG \\ -o 70396a.zf.pdf \\ 70396a.pdf
Doku: https://ghostscript.readthedocs.io/en/latest/ZUGFeRD.html
hier muss 70396a.pdf bereits ein PDF/A-3 sein. Daher erst das PDF in ein PDF/A-3 umwandeln.
Das geht mit der mit Debian 12 mitgelieferten ghostscript-Version:
gs \\ -dPDFA=3 \\ -dBATCH \\ -dNOPAUSE \\ -sProcessColorModel=DeviceRGB \\ -sDEVICE=pdfwrite \\ -dPDFACompatibilityPolicy=1 \\ -sOutputFile=70396a.A-3.pdf \\ 70396a.pdf
java \\ -Xmx1G \\ -Dfile.encoding=UTF-8 \\ -jar Mustang-CLI-2.15.1.jar \\ --action combine
java \\ -Xmx1G \\ -Dfile.encoding=UTF-8 \\ -jar Mustang-CLI-2.15.1.jar \\ -no-notices \\ --action validate \\ --source 70396a.xml
java // -Dlog4j2.configurationFile=resources/log4j2.xml // -jar OpenXRechnungToolbox.jar // -val // -i ../70396a.xml // -o testreport1.html // -v 3.0.
Doku: https://jcthiele.github.io/OpenXRechnungToolbox/resources/help/manual.html#cli