Html to Pdf Transformation Failing

Hi Team,
We are trying to transformation input file with below code.

com.aspose.pdf.HtmlLoadOptions htmloptions = new com.aspose.pdf.HtmlLoadOptions();
com.aspose.pdf.Document doc = new com.aspose.pdf.Document("C:\\Input\\HTML.html", htmloptions); 
doc.save("C:\\Output\\html.pdf");

We are getting errors related on this which I have attached in the zip.
The transformation is inconsistent.

files.zip (4.6 KB)

Thanks,
Krishna

@rnara

We have tested using 24.1 version of the API and could not replicate the issue. Can you please share some environment details and steps to replicate the issue. We have attached an output generated in our environment as well.
html2PDF.pdf (252.1 KB)

Hi Team,
Can you specify which java version you have tried with?
Thanks,
Krishna

@rnara

We used JDK 1.8. You can share your environment details so that we can test in specific environment as well.

Hi Team ,
Can you please try with jdk 17.
Thanks,
Krishna

@rnara

We tried with JDK 17 as well. Please check the screenshot.
image.png (75.6 KB)

We could not notice any issues.

Hi Team,
I am adding my project files in the zip can you check and update?asposeHtmlToPDF.zip (5.1 KB)

Thanks,
Krishna’

@rnara

It is only Java Class that has code snippet which we already tested. Can you please share complete Maven Console Application in .zip format? We will test it and address the issue accordingly.

Hi Team,
The zip file is bigger around 130Mb, So, can’t upload it here.
Can you share any drive where we can upload the zip file.
Thanks,
Krishna

@rnara

Instead of sharing the whole project, can you please create a simple console application and share that with us in .zip format? If its size is larger, you can please upload it to any public file sharer service e.g. Google Drive and share the link with us.

Hi Team,
Do you have any private file server where we can share the project instead of public one?
Thanks,
Krishna

@rnara

We are afraid that we only allow attachments in our forum to be uploaded on our server. Apart from it, we do not have any service like it. Nevertheless, you can simply share your pom.xml and Java Class for us from the sample console application that you created. We configure a new application in our environment and use those files to replicate the issue. Also, please share complete environment details of yours.

Hi Team,
Can you share your project for Html to Pdf transformation?
Thanks,
Krishna

@rnara

We tested the scenario in our main project which has large size. However, we can setup a console application and share with you that you can run in your environment as well to test. Please allow us to create one and share with you soon.

Hi team,
Please proceed with setting up console.
Thanks,
Krishna

Hi Team,

We have transformed html file to PDF with aspose pdf version 23.11.

Here I attached the html file.
HTML.zip (4.4 KB)

It’s still not working. Please find the below error.

Exception in thread “main” java.lang.NoClassDefFoundError: javax/xml/bind/DatatypeConverter
at com.aspose.pdf.internal.html.rendering.l0h.lI(Unknown Source)
at com.aspose.pdf.internal.html.rendering.l0h.lI(Unknown Source)
at com.aspose.pdf.internal.l43j.l0l.lf(Unknown Source)
at com.aspose.pdf.internal.l43if.ly.lI(Unknown Source)

Caused by: java.lang.ClassNotFoundException: javax.xml.bind.DatatypeConverter
at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:641)
at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:188)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:520)

Can you please look into it ?

Regards,
Krishna

@rnara

We have opened the following new ticket(s) in our internal issue tracking system and will deliver their fixes according to the terms mentioned in Free Support Policies.

Issue ID(s): PDFJAVA-43572

You can obtain Paid Support Services if you need support on a priority basis, along with the direct access to our Paid Support management team.

Hi Team,
Any update on this?
Can you please Provide ETA?
Thanks,
Krishna

@rnara

The has recently been logged in our issue management system and will be prioritized on a first come first serve basis. As soon as we make some progress towards its resolution or have some news about the ETA, we will inform you. Please spare us some time.

Hi Team,
Please Take this to priority, As this issue is very critical for us and we need to take this to end as soon as possible.
Thanks,
Krishna