Merge pull request #849 from langfr/extract

Ignore calculation errors when extracting xml from pdf.
This commit is contained in:
Jochen Staerk
2025-06-26 10:28:19 +02:00
committed by GitHub

View File

@@ -565,7 +565,9 @@ public class Main {
ensureFileNotExists(xmlName);
// All params are good! continue...
ZUGFeRDImporter zi = new ZUGFeRDImporter(pdfName);
ZUGFeRDImporter zi = new ZUGFeRDImporter();
zi.doIgnoreCalculationErrors();
zi.setPDFFilename(pdfName);
byte[] XMLContent = zi.getRawXML();
if (XMLContent == null) {
System.err.println("No ZUGFeRD XML found in PDF file");