@alexey.noskov
Thank you for your response! I have an issue with Aspose.PDF that I’d like to consult about. According to the demo code for HTML to PDF conversion on the official website, the thread remains in a Running state while instantiating the Document, causing the entire process to hang.
"http-nio-8080-exec-4" #35 daemon prio=5 os_prio=0 cpu=203687.50ms elapsed=439.11s tid=0x000001f9db59a8f0 nid=0x3094 runnable [0x000000638e0f7000]
java.lang.Thread.State: RUNNABLE
at com.aspose.pdf.internal.ms.System.Collections.Generic.ld$lI.lI(Unknown Source)
at com.aspose.pdf.internal.ms.System.Collections.Generic.lf.containsKey(Unknown Source)
at com.aspose.pdf.internal.l44n.lf.lI(Unknown Source)
at com.aspose.pdf.internal.l44n.lI.lu(Unknown Source)
at com.aspose.pdf.internal.l43l.l0j.l4h(Unknown Source)
at com.aspose.pdf.internal.l46p.lI.lt(Unknown Source)
The code executes and never stop while instantiating the Document:
import com.aspose.pdf.*;
.....
// Load HTML file
HtmlLoadOptions htmlLoadOptions = new HtmlLoadOptions(baseDir);
// Enable/Disable font embedding
htmlLoadOptions.setEmbedFonts(true);
// Set Print or Screen mode
htmlLoadOptions.setHtmlMediaType(HtmlMediaType.Print);
// Initialize document object
logger.info("Creating Document");
pdfDocument = new Document(baseDir + inputHtmlPath, htmlLoadOptions);
// Save the PDF to the output file
logger.info("Saving Document");
pdfDocument.save(baseDir + outputPdfPath);
pdfDocument.close();
The version of the package is aspose-pdf-24.9-jdk17.jar.
Can you please look into this and suggest?
Thanks!