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

Free Support Forum - aspose.com

Css is not working and pdf form got distorted while converting html to pdf

I am able to make fields editable while converting html to pdf.

It works fine when I convert HTML-->pdf by doing "HTML to pdf" conversion by usind acrobat professional directly.

But the css does not work and form got distorted when We try to convert the html to pdf using Aspose.pdf.dll. The Product version is 2012.12.09. I am using the following code to do the same:

Aspose.Pdf.License license = new Aspose.Pdf.License();


StreamReader r1 = File.OpenText(@"D:/Test/Testhtml_pdf.html");

Aspose.Pdf.Generator.Text text2 = new Aspose.Pdf.Generator.Text(section, r1.ReadToEnd());

text2.IsHtmlTagSupported = true;


pdf.HtmlInfo.ImgUrl = "D:/Test/";


Hi there,

Thanks for your inquiry. Can you please share your sample HTML + CSS source files here? So we will test the scenario at our end and will provide you more information accordingly.

We are sorry for the inconvenience faced.

Best Regards,

I have attached the file. Please check it


html send in the above post. Please provide the solution.

Hi there,

Thank you for sharing source HTML. While testing the scenario with latest version of Aspose.Pdf for NET 8.4.0, I've managed to reproduce the issue and logged it in our bug tracking system as PDFNEWNET-35825 for further investigation and resolution. I've also linked your request to this issue and you will be notified via this thread as soon as it is resolved.

Please feel free to contact us for any further assistance.

Best Regards,


Is this issue resolved now?

What We need to resolve it at our end?

Do We need to add latest aspose dll or Do We need to do some modifications in our code to get it resolved. Kindly advise.

Please respond asap



Hi Palak,

Thanks for your inquiry. I’m afraid your reported is still not resolved as we have recently noticed the issue and its still pending for the investigation with other priority tasks. Please spare us little time we will keep you updated about the issue progress via this forum thread.

Thanks for your patience and cooperation.

Best Regards,


Can You please provide any update on this issue?



Hi Palak,

We are sorry for the inconvenience, your reported issue is not resolved yet. We are unable to share any estimate at the moment as its investigation is pending and its in a queue with other priority tasks. As soon as its completed we will be in good position to share an ETA.

Best Regards,

The issues you have found earlier (filed as PDFNEWNET-35825) have been fixed in Aspose.Pdf for .NET 9.1.0.

For further details, you may check this blog post.

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

HI Palak,

Thanks for your patience. You may use new DOM approach for HTML to PDF conversion. Please try following code snippet, it will fix the issue.

HtmlLoadOptions options = new HtmlLoadOptions();<o:p></o:p>

// use the new conversion engine<o:p></o:p>

options.UseNewConversionEngine = true;<o:p></o:p>

// load HTML file<o:p></o:p>

Document pdfDocument = new Document(“Input.html”, options);

// save output as PDF format<o:p></o:p>

pdfDocument.Save(myDir + “Output.pdf”);


<o:p>Please feel free to contact us for any further assistance.</o:p>

Best Regards,