I have a 2 page document which I am trying to convert from pdf to pdf-a using the following code.
try (final Document pdfDocument = new Document(inputFile.getAbsolutePath())) {
pdfDocument.convert(xmlPath + "/log.xml", PdfFormat.PDF_A_1A, ConvertErrorAction.Delete);
pdfDocument.save(outputFile.getAbsolutePath());
}
The conversion fails with the following error.
com.aspose.pdf.internal.ms.System.l5v: Unknown char: V
at com.aspose.pdf.internal.l159if.le.lI(Unknown Source) ~[application.jar:?]
at com.aspose.pdf.internal.l159if.le.lI(Unknown Source) ~[application.jar:?]
at com.aspose.pdf.internal.l159if.le.lI(Unknown Source) ~[application.jar:?]
at com.aspose.pdf.internal.ms.System.l4l.lI(Unknown Source) ~[application.jar:?]
at com.aspose.pdf.internal.l10if.l0p.lb(Unknown Source) ~[application.jar:?]
at com.aspose.pdf.internal.l2t.l0p.ld(Unknown Source) ~[application.jar:?]
at com.aspose.pdf.DocumentInfo.<init>(Unknown Source) ~[application.jar:?]
at com.aspose.pdf.ADocument.l1n(Unknown Source) ~[application.jar:?]
at com.aspose.pdf.ADocument.lI(Unknown Source) ~[application.jar:?]
at com.aspose.pdf.ADocument.<init>(Unknown Source) ~[application.jar:?]
at com.aspose.pdf.Document.<init>(Unknown Source) ~[application.jar:?]
at org.package.application.pdftransform.AsposePDFTransformer.ConvertPDFToPDFa1a(AsposePDFTransformer.java:18) ~[application.jar:?]
at org.package.application.pdftransform.AlfrescoPDFConvert.importSingleFile(AlfrescoPDFConvert.java:177) ~[application.jar:?]
at org.package.application.pdftransform.NodeRefFileProcessor.importSingleFile(NodeRefFileProcessor.java:237) [application.jar:?]
at org.package.application.pdftransform.NodeRefFileProcessor.processFileList(NodeRefFileProcessor.java:142) [application.jar:?]
at org.package.application.Monitor.importFileList(Monitor.java:116) [application.jar:?]
at org.package.application.Monitor.processFiles(Monitor.java:212) [application.jar:?]
at org.package.application.Monitor.processTree(Monitor.java:220) [application.jar:?]
at org.package.application.Monitor.runFileMonitor(Monitor.java:292) [application.jar:?]
at org.package.application.Monitor.run(Monitor.java:257) [application.jar:?]
at java.lang.Thread.run(Unknown Source) [?:1.8.0_65]
Is this due to an unknown font or something else? Is there any setting changes I can make to the Document to fix this?
Document details according to adobe reader
PDF-producer: OpenPDF 1.3.28
PDF-version: 1.4 (Acrobat 5.x)
Size: 48,95 kb
Pagesize: 210 x 297 mm
Coded PDF: Yes
Number of pages: 2
I cannot share the document due to it containing confidential information.