PDF to PDFA convertion error

Hi there;

I’m facing the problem when converting pdf to pdf/a, the error I got:
==========================================================
java.lang.NullPointerException
at com.aspose.pdf.internal.p244.z29.m1(Unknown Source)
at com.aspose.pdf.internal.p247.z2.m1(Unknown Source)
at com.aspose.pdf.internal.p422.z12.m4(Unknown Source)
at com.aspose.pdf.internal.p422.z12.m7(Unknown Source)
at com.aspose.pdf.internal.p422.z12.m3(Unknown Source)
at com.aspose.pdf.internal.p422.z8.m1(Unknown Source)
at com.aspose.pdf.internal.p423.z12.m3(Unknown Source)
at com.aspose.pdf.internal.p423.z7.(Unknown Source)
at com.aspose.pdf.internal.p423.z9.(Unknown Source)
at com.aspose.pdf.internal.p423.z12.(Unknown Source)
at com.aspose.pdf.internal.p422.z8.m1(Unknown Source)
at com.aspose.pdf.internal.p425.z29.m27(Unknown Source)
at com.aspose.pdf.internal.p428.z7.m1(Unknown Source)
at com.aspose.pdf.internal.p428.z10.m2(Unknown Source)
at com.aspose.pdf.internal.p428.z10.(Unknown Source)
at com.aspose.pdf.internal.p428.z7.m1(Unknown Source)
at com.aspose.pdf.internal.p428.z12.m1(Unknown Source)
at com.aspose.pdf.internal.p428.z12.m3(Unknown Source)
at com.aspose.pdf.internal.p428.z12.m7(Unknown Source)
at com.aspose.pdf.internal.p428.z12.m7(Unknown Source)
at com.aspose.pdf.internal.p428.z14.m1(Unknown Source)
at com.aspose.pdf.internal.p428.z14.m1(Unknown Source)
at com.aspose.pdf.internal.p428.z14.m6(Unknown Source)
at com.aspose.pdf.internal.p428.z14.(Unknown Source)
at com.aspose.pdf.internal.p428.z14.(Unknown Source)
at com.aspose.pdf.internal.p428.z14.(Unknown Source)
at com.aspose.pdf.internal.p465.z2.m1(Unknown Source)
at com.aspose.pdf.internal.p465.z2.m12(Unknown Source)
at com.aspose.pdf.internal.p465.z2.m1(Unknown Source)
at com.aspose.pdf.ADocument.convert(Unknown Source)
at com.aspose.pdf.Document.convert(Unknown Source)
at com.aspose.pdf.ADocument.validate(Unknown Source)
at com.aspose.pdf.Document.validate(Unknown Source)
at de.ber.components.utils.PDFUtils.convertToPDFA(PDFUtils.java:32)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)…
==========================================================

My implementation:

com.aspose.pdf.Document pdfDocument = new com.aspose.pdf.Document(“input.pdf”);
pdfDocument.validate(“Validation_log.xml”, com.aspose.pdf.PdfFormat.PDF_A_1B);
pdfDocument.convert(“Conversion_log.xml”, com.aspose.pdf.PdfFormat.PDF_A_1B, com.aspose.pdf.ConvertErrorAction.Delete);
pdfDocument.save(“output.pdf”);

I’m using Java version 1.8 with Aspose PDF version 9.3.1.
Do you have any idea?

Thank you.


Hi Duy,


Thanks for your inquiry. You are using a quite old version of Aspose.Pdf for Java, we have made number of fixes and improvements in later versions. Please download and try latest version of Aspose.Pdf for Java, hopefully it will resolve the issue. However, if the issue persist then please share your sample PDF document here, we will look into it and will guide you accordingly.

We are sorry for the inconvenience caused.

Best Regards,