Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CLI: action combine: --ignorefileextension to ignore PDF/A input file errors dosen't work #392

Closed
joergenp opened this issue Jun 17, 2024 · 1 comment

Comments

@joergenp
Copy link

when combining a pdf (created as PDF/A-1b with Libre Office) with a xml the CLI throws
ERROR ROOT - File is not a valid PDF/A-1 input file
independent of option --ignorefileextension.

By looking at the source I can see that .load(pdfName) ist called before .ignorePDFAErrors() (code line 715-728):

				ze = new ZUGFeRDExporterFromPDFA().load(pdfName);

					ze.setProducer("Mustang-cli")
					.setZUGFeRDVersion(zfIntVersion)
					.setCreator(System.getProperty("user.name")).setProfile(zfConformanceLevelProfile);
				if (ignoreInputErrors) {
					((ZUGFeRDExporterFromA1) ze).ignorePDFAErrors();
				}
			}
			for (FileAttachment attachment : attachments) {
				((ZUGFeRDExporterFromA3) ze).attachFile(attachment.getFilename(), attachment.getData(), attachment.getMimetype(), attachment.getRelation());
			}

//			ze = ze.load(pdfName);

Seems this was introduced on #341

@jstaerk
Copy link
Collaborator

jstaerk commented Jun 26, 2024

I added a test for the functionality itself in [d22a8a0] , unfortunately I cant test end-to-end yet due to a Exception in thread "main" java.lang.NoClassDefFoundError: jakarta/activation/DataSource... I hope I can fix that soon

@jstaerk jstaerk closed this as completed Jun 27, 2024
jstaerk added a commit that referenced this issue Jun 27, 2024
langfr pushed a commit to langfr/mustangproject that referenced this issue Jun 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants