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

Free Support Forum - aspose.com

Html to PDF and vice versa

Hi all,

We are converting HTML document to PDF with below code:

String basePath = @“some_base_path”;
HtmlLoadOptions htmloptions = new HtmlLoadOptions(basePath);
// Load HTML file
Document doc = new Document(@“OrgFile.html”, htmloptions);
// Save PDF file

If we do reverse i.e converting this output.pdf, which was generated by above code, into html file then we are not getting original html content file.

Code for the same is
Aspose.Pdf.Document document = new Aspose.Pdf.Document(@"“output.pdf”);
We expect OrgFile.html and NewHtml.html exact same i.e. div, classes used inside it etc.

Could you please tell us, how to achieve this ?

Hi Bipin,

Thanks for your inquiry. I have tested the HTML>PDF>HTML conversion scenario and noticed that final HTML is not rendering as expected, so logged a ticket PDFNEWNET-39709 in our issue tracking system for further investigation and resolution. We will notify you as soon as it is resolved.

We are sorry for the inconvenience caused.

Best Regards,