This commit is contained in:
Martin Wachtveitl
2023-11-22 14:15:15 +01:00
parent 0d0678b848
commit 43241eaa7a

View File

@@ -44,7 +44,7 @@ public class ZUGFeRDExporterFromPDFA implements IZUGFeRDExporter {
} }
private byte[] fileToByteArrayInputStream(String pdfFilename) throws IOException { private byte[] fileToByteArrayInputStream(String pdfFilename) throws IOException {
FileInputStream fileInputStream = new FileInputStream(new File(pdfFilename)); FileInputStream fileInputStream = new FileInputStream(pdfFilename);
return fileInputStream.readAllBytes(); return fileInputStream.readAllBytes();
} }
@@ -52,8 +52,6 @@ public class ZUGFeRDExporterFromPDFA implements IZUGFeRDExporter {
// PDFBOX to be here... // PDFBOX to be here...
PDDocument document = PDDocument.load(byteArrayInputStream); PDDocument document = PDDocument.load(byteArrayInputStream);
PDDocumentCatalog catalog = document.getDocumentCatalog(); PDDocumentCatalog catalog = document.getDocumentCatalog();
//short way to get PDF version
//document.getDocument().getVersion();
PDMetadata metadata = catalog.getMetadata(); PDMetadata metadata = catalog.getMetadata();
if (metadata != null) { if (metadata != null) {