#451 corrected so that file attachments are also possible if source is a PDF/A-1 (and destination PDF/A-3)
This commit is contained in:
@@ -735,11 +735,7 @@ public class Main {
|
||||
ze.setXML(Files.readAllBytes(Paths.get(xmlName)));
|
||||
|
||||
for (FileAttachment attachment : attachments) {
|
||||
if (((ZUGFeRDExporterFromPDFA) ze).getExporter() instanceof ZUGFeRDExporterFromA3 ) {
|
||||
((ZUGFeRDExporterFromA3) ((ZUGFeRDExporterFromPDFA) ze).getExporter()).attachFile(attachment.getFilename(), attachment.getData(), attachment.getMimetype(), attachment.getRelation());
|
||||
} else {
|
||||
System.err.println("IZUGFeRDExporter ze is not of type 'ZUGFeRDExporterFromA3'");
|
||||
}
|
||||
ze.attachFile(attachment.getFilename(), attachment.getData(), attachment.getMimetype(), attachment.getRelation());
|
||||
}
|
||||
|
||||
ze.export(outName);
|
||||
|
||||
Reference in New Issue
Block a user