HTML to PDF conversion error

Hi, We are trying to convert a HTML file to PDF.
I am getting below error during conversion.

Exception in thread "main" java.lang.ClassCastException: com.aspose.pdf.internal.p187.z7 cannot be cast to com.aspose.pdf.internal.p188.z10
at com.aspose.pdf.internal.p188.z25$z1.m1(Unknown Source)
at com.aspose.pdf.internal.p191.z47.m1(Unknown Source)
at com.aspose.pdf.internal.p183.z26.m1(Unknown Source)
at com.aspose.pdf.internal.p183.z31.m1(Unknown Source)
at com.aspose.pdf.internal.p183.z26.m4(Unknown Source)
at com.aspose.pdf.internal.p188.z20.m1(Unknown Source)
at com.aspose.pdf.internal.p183.z16.m1(Unknown Source)
at com.aspose.pdf.internal.p188.z25.m1(Unknown Source)
at com.aspose.pdf.internal.p183.z13$z1.m1(Unknown Source)
at com.aspose.pdf.internal.p183.z13.m1(Unknown Source)
at com.aspose.pdf.internal.p209.z11.m1(Unknown Source)
at com.aspose.pdf.internal.p209.z11.m1(Unknown Source)
at com.aspose.pdf.internal.p209.z11.m1(Unknown Source)
at com.aspose.pdf.internal.p170.z22.m1(Unknown Source)
at com.aspose.pdf.internal.p170.z22.m1(Unknown Source)
at com.aspose.pdf.internal.p341.z1.m1(Unknown Source)
at com.aspose.pdf.internal.p341.z1.m1(Unknown Source)
at com.aspose.pdf.z34.m1(Unknown Source)
at com.aspose.pdf.ADocument.m1(Unknown Source)
at com.aspose.pdf.ADocument.(Unknown Source)
at com.aspose.pdf.Document.(Unknown Source)
at AsposeHTMLtoPDF.main(AsposeHTMLtoPDF.java:19)


Have attached following docs for your reference, pls not i am using 30 days evaluation licence.
1. Code - HtmlToPdf.txt
2. Source File - HtmlToPdf2.txt

Hi Prabu,

Thanks for your inquiry. I have tested your scenario with shared document using Aspose.Pdf for Java 10.6.1 and managed to observe the reported exception. For further investigation, I have logged an issue in our issue tracking system as PDFNEWJAVA-35190 and also linked your request to it. We will keep you updated via this thread regarding the issue status.

We are sorry for the inconvenience caused.

Best Regards,

Hi , Any updates on this issue.

Hi Prabu,


Thanks for your inquiry. I am afraid your above reported issue is still not resolved as product team is busy in resolving other issues in the queue, reported earlier. However I have raised the priority of your issue and requested our team to share the ETA at their earliest. We will notify you as soon as we made some significant progress towards issue resolution.

Thanks for your patience and cooperation…

Best Regards,

The issues you have found earlier (filed as PDFNEWJAVA-35190) have been fixed in Aspose.Pdf for Java 11.6.0.


This message was posted using Notification2Forum from Downloads module by Aspose Notifier.