From d8efeb10e0fba15735c442db3f8216be34cf6edd Mon Sep 17 00:00:00 2001 From: Chris Grieger Date: Thu, 15 Apr 2021 15:56:32 +0200 Subject: [PATCH] Set ignoreInputErrors flag before loading PDFs --- .../main/java/org/mustangproject/commandline/Main.java | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/Mustang-CLI/src/main/java/org/mustangproject/commandline/Main.java b/Mustang-CLI/src/main/java/org/mustangproject/commandline/Main.java index fe4bba87..226f3a57 100755 --- a/Mustang-CLI/src/main/java/org/mustangproject/commandline/Main.java +++ b/Mustang-CLI/src/main/java/org/mustangproject/commandline/Main.java @@ -642,15 +642,16 @@ public class Main { } // All params are good! continue... - ZUGFeRDExporterFromA1 ze = (ZUGFeRDExporterFromA1) new ZUGFeRDExporterFromA1().setProducer("Mustang-cli") + ZUGFeRDExporterFromA1 ze = new ZUGFeRDExporterFromA1().setProducer("Mustang-cli") .setZUGFeRDVersion(zfIntVersion) - .setCreator(System.getProperty("user.name")).setProfile(zfConformanceLevelProfile) - .load(pdfName); + .setCreator(System.getProperty("user.name")).setProfile(zfConformanceLevelProfile); + if (ignoreInputErrors) { ze.ignorePDFAErrors(); - } + ze = ze.load(pdfName); + if (!format.equals("fx")) { ze.disableFacturX(); }