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

Free Support Forum - aspose.com

Html to Pdf conversion exception

Hello,

We are currently using older version of the library, but the same thing happens on latest v17.4 Using this snippet
LoadOptions loadOptions = new HtmlLoadOptions();
try (
InputStream is = new FileInputStream(“d:\temp\chitasampledocs\invalid_files\content_22481_22510.html”);
OutputStream os = new FileOutputStream(“d:\temp\chitasampledocs\invalid_files\content_22481_22510.pdf”);
) {
Document document = new Document(is, loadOptions);
document.save(os, com.aspose.pdf.SaveFormat.Pdf);
}


and converting attached html file into pdf results in following exception:
Exception in thread “main” class com.aspose.pdf.internal.p721.z1: Ambiguous match found.
com.aspose.pdf.internal.p721.z79.m1(Unknown Source)
com.aspose.pdf.internal.ms.System.z142.m3(Unknown Source)
com.aspose.pdf.internal.ms.System.z142.m2(Unknown Source)
com.aspose.pdf.internal.p379.z3.m1(Unknown Source)
com.aspose.pdf.internal.p388.z24.m1(Unknown Source)
com.aspose.pdf.internal.p388.z16.m1(Unknown Source)
com.aspose.pdf.internal.p381.z13.m1(Unknown Source)
com.aspose.pdf.internal.p388.z25.m1(Unknown Source)
com.aspose.pdf.internal.p383.z3.m1(Unknown Source)
com.aspose.pdf.internal.p383.z3.m1(Unknown Source)
com.aspose.pdf.internal.p383.z3.m1(Unknown Source)
com.aspose.pdf.internal.p383.z3.m1(Unknown Source)
com.aspose.pdf.internal.p383.z3.m1(Unknown Source)
com.aspose.pdf.internal.p383.z3.m1(Unknown Source)
com.aspose.pdf.internal.p383.z3.m1(Unknown Source)
com.aspose.pdf.internal.p383.z3.m1(Unknown Source)
com.aspose.pdf.internal.p383.z3.m1(Unknown Source)
com.aspose.pdf.internal.p383.z3.m1(Unknown Source)
com.aspose.pdf.internal.p383.z3.m1(Unknown Source)
com.aspose.pdf.internal.p383.z3.m1(Unknown Source)
com.aspose.pdf.internal.p299.z3.m1(Unknown Source)
com.aspose.pdf.internal.p430.z1.m1(Unknown Source)
com.aspose.pdf.internal.p468.z1.m1(Unknown Source)
com.aspose.pdf.internal.p429.z13.m1(Unknown Source)
com.aspose.pdf.z89.m1(Unknown Source)
com.aspose.pdf.z89.m1(Unknown Source)
com.aspose.pdf.ADocument.m1(Unknown Source)
com.aspose.pdf.ADocument.(Unknown Source)
com.aspose.pdf.Document.(Unknown Source)
com.aspose.pdf.examples.AsposePdfGenerator.Conversion.HTMLToPDF.main(HTMLToPDF.java:33)
at com.aspose.pdf.internal.p721.z79.m1(Unknown Source)
at com.aspose.pdf.internal.ms.System.z142.m3(Unknown Source)
at com.aspose.pdf.internal.ms.System.z142.m2(Unknown Source)
at com.aspose.pdf.internal.p379.z3.m1(Unknown Source)
at com.aspose.pdf.internal.p388.z24.m1(Unknown Source)
at com.aspose.pdf.internal.p388.z16.m1(Unknown Source)
at com.aspose.pdf.internal.p381.z13.m1(Unknown Source)
at com.aspose.pdf.internal.p388.z25.m1(Unknown Source)
at com.aspose.pdf.internal.p383.z3.m1(Unknown Source)
at com.aspose.pdf.internal.p383.z3.m1(Unknown Source)
at com.aspose.pdf.internal.p383.z3.m1(Unknown Source)
at com.aspose.pdf.internal.p383.z3.m1(Unknown Source)
at com.aspose.pdf.internal.p383.z3.m1(Unknown Source)
at com.aspose.pdf.internal.p383.z3.m1(Unknown Source)
at com.aspose.pdf.internal.p383.z3.m1(Unknown Source)
at com.aspose.pdf.internal.p383.z3.m1(Unknown Source)
at com.aspose.pdf.internal.p383.z3.m1(Unknown Source)
at com.aspose.pdf.internal.p383.z3.m1(Unknown Source)
at com.aspose.pdf.internal.p383.z3.m1(Unknown Source)
at com.aspose.pdf.internal.p383.z3.m1(Unknown Source)
at com.aspose.pdf.internal.p299.z3.m1(Unknown Source)
at com.aspose.pdf.internal.p430.z1.m1(Unknown Source)
at com.aspose.pdf.internal.p468.z1.m1(Unknown Source)
at com.aspose.pdf.internal.p429.z13.m1(Unknown Source)
at com.aspose.pdf.z89.m1(Unknown Source)
at com.aspose.pdf.z89.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 com.aspose.pdf.examples.AsposePdfGenerator.Conversion.HTMLToPDF.main(HTMLToPDF.java:33)


Hello There,


Thanks for contacting support.

I have tested the scenario using latest version of the API and observed the exception which you have reported. It seems that API is generating exception while converting your HTML file into PDF, so I have logged an issue as PDFJAVA-36728 in our issue tracking system. We will further look into the details of the issue and keep you updated on the status of its rectification.

Please be patient and spare us little time. We are sorry for the inconvenience.

Best Regards,

The issues you have found earlier (filed as PDFJAVA-36728) have been fixed in Aspose.Pdf for Java 17.5.


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

The issues you have found earlier (filed as ) have been fixed in this update. This message was posted using BugNotificationTool from Downloads module by MuzammilKhan