We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Error in PDF compliance conversion


I am converting a PDF document to PDFA using the following APIs

com.aspose.pdf.Document pdfDocument = new com.aspose.pdf.Document(“Input.pdf”);

pdfDocument.convert(“Conversion_log.xml”, com.aspose.pdf.PdfFormat.PDF_A_1A, com.aspose.pdf.ConvertErrorAction.Delete);

There is Apose.Toal license installed on the server where the conversion is happening.

But I am getting the following exception:

class com.aspose.pdf.internal.p348.z87: At most 4 elements (for any collection) can be viewed in evaluation mode.
com.aspose.pdf.ADocument.m1(Unknown Source)
com.aspose.pdf.PageCollection.m1(Unknown Source)
com.aspose.pdf.PageCollection.get_Item(Unknown Source)
com.aspose.pdf.internal.p626.z2.m1(Unknown Source)
com.aspose.pdf.internal.p626.z2.m1(Unknown Source)
com.aspose.pdf.ADocument.convert(Unknown Source)
com.aspose.pdf.Document.convert(Unknown Source)
com.aspose.pdf.ADocument.convert(Unknown Source)
com.aspose.pdf.Document.convert(Unknown Source)

I have checked the license path and the code to get the license through which I am able to generate DOCX file also.

Kindly help.

Prabhaker Kr.

Hi Prabhaker,

Thanks for your inquiry. I am afraid the Aspose license is not installed but you need to implement license object your code before using any Aspose.Pdf object. Please initialize the license object as suggested here, hopefully it will resolve the issue. Moreover, you can verify license implementation using isLicensed() property as following.

//Instantiate Pdf document object <o:p></o:p>

com.aspose.pdf.Document pdf = new com.aspose.pdf.Document("input.pdf");

System.out.println("is licensed: "+pdf.isLicensed());



Please feel free to contact us for any further assistance.

Best Regards,