PeBr
PeBr

Reputation: 1

no xml file in ZuGFeRD PDF with ghostscript

i want to use ghostscript to create an Zugferd invoice The konvertion from PDF into PDF/A3 is successfull but there is no xml attached. i use it with the shell option in ms access, therefore i build a string:

str = "gswin64c " & _
" -dNOSAFER " & _
"    -sDEVICE=pdfwrite " & _
"    -dPDFA=3 " & _
"    -sColorConversionStrategy=RGB " & _
"    -sZUGFeRDXMLFile=C:/users/public/gszugferd/ZUGFeRD-invoice.xml " & _
"    -sZUGFeRDProfile=C:/users/public/gszugferd/srgb.icc     " & _
"    -sZUGFeRDVersion=2p1 " & _
"    -sZUGFeRDConformanceLevel=BASIC " & _
"    -o /users/public/gszugferd/zugausgabe.pdf " & _
"    /users/public/gszugferd/zugferd.ps  " & _
"    /users/public/gszugferd/R4688.pdf "`

The pdf is created, but no xml added. srgb.icc and zugferd.ps is original from the gs lib.

is there any requirement for the xml file to be attached ?

Upvotes: 0

Views: 316

Answers (2)

K J
K J

Reputation: 11739

The XML file is usually embed but without a visible name. There are on occasion problems using some source files with /AF (Attached File) named markers in versions 10.04.0. A full install from latest source should clear those.

The previous "known good" ZuGFeRD compatible working releases were supposedly 10.02 or perhaps 10.03 if lucky.

All the latest corrections are scheduled to be in Release 10.05 due about March 2025

Upvotes: 0

A.S.
A.S.

Reputation: 1

There is probably a bug in ghostscript 10.04 with ZugFerd.ps - It took me several hours before i tried it with gs 10.03.0 . I added a Watermark to show in PDF that XML is included. Now it works for me in Windows for ZugFerd Extended:

"C:\Program Files\gs\gs10.03.0\bin\gswin64c.exe" 
--permit-file-read=d:/ 
-dNOSAFER 
-sDEVICE=pdfwrite 
-dPDFA=3 
-sColorConversionStrategy=RGB 
-sZUGFeRDXMLFile="D:\source\factur_x.xml" 
-sZUGFeRDProfile="D:\gsdata\AdobeRGB1998.icc" 
-sZUGFeRDVersion=2p1 
-sZUGFeRDConformanceLevel="EXTENDED" 
-o "D:\zfOut\ZugFerdInvoice.pdf" 
"D:\gsdata\ZugferdWatermark.ps" 
"d:\gsdata\zugferd.ps" 
"D:\source\invoice_source.pdf" 
-c "[ /Title (inv Nr.<inr>) /Author (<author>) /Subject (electronic 
invoice...MD5-Hash: ddf1d350105368f69e897...) /Keywords (<keywords>)  
/DOCINFO pdfmark

Upvotes: 0

Related Questions