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

Free Support Forum - aspose.com

Unable to generate PDF from HTML file

Hello

I’m trying to generate the PDF using attached HTML but some how It’s not being generated and it’s not throwing the exception as well. It seems that it went for the infinite while creating object of Aspose.Pdf.Document class. Attaching the HTML here.

string basePath = “wwwroot//HTML Templates//Base Template//”;
Aspose.Pdf.HtmlLoadOptions objLoadOptions = new Aspose.Pdf.HtmlLoadOptions(basePath);
objLoadOptions.PageInfo.Margin = new MarginInfo(0, 0, 0, 0);
objLoadOptions.PageInfo.Height = 792;//11 inch
objLoadOptions.PageInfo.Width = 612;//8.5 inch
objLoadOptions.PageInfo.IsLandscape = false;
objLoadOptions.IsEmbedFonts = true;
//It went for infinite while executing below line for other HTML contents it’s working fine.
Aspose.Pdf.Document doc = new Aspose.Pdf.Document(“wwwroot//HTML Templates//Base Template//test.html”, objLoadOptions);
doc.DisableFontLicenseVerifications = true;
doc.Convert(“wwwroot//PDFs//out.log”, PdfFormat.PDF_UA_1, ConvertErrorAction.Delete);
doc.Save(“test.pdf”, SaveFormat.Pdf);

Regards,
Synoptek

demo.zip (17.6 KB)

@siriussynoptek

I can not reproduce the issue and the PDF is created fine in few seconds. I request you to upgrade to latest version and share your feedback.test.pdf (180.5 KB)

I have updated the current version to 21.5 but still facing the same issue.

Regards,
Synoptek

@siriussynoptek

Can you please share a sample application so that we may try to reproduce the same on our end.

Aspose Demo App.zip (911.1 KB)
Here you go.

@siriussynoptek

I have been able to reproduce the issue on our end. A ticket with ID PDFNET-50016 has been created in our issue tracking system to further investigate the issue on our end. This thread has been linked with the issue so that you may be notified once the issue will be fixed.

Any ETA for the resolution?

Regards,
Synoptek

@siriussynoptek

Please note that it is logged in free support model and will be investigated and resolved on a first come first serve basis. We will surely inform you as soon as we make some definite progress towards its resolution.

just to confirm if we’ll logged this ticket from paid support then it well get served on priority?

Regards,
Synoptek

@siriussynoptek

Yes, you are right. Escalating it to Paid Support will expedite the investigations.