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

Free Support Forum - aspose.com

HTML rendering in Aspose pdf

Is there any way to render the complete html, also css in aspose pdf. I worked on it but i found that some tages and their properties doesn’t work. For example if we give border styles in style property, it doesn’t work…

Liaqat Ali

Hello!<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

Thank you for considering Aspose.

CSS styles are supported on HTML import but with many restrictions. I’ll link your request to appropriate issues. Current HTML/CSS import implementation expects certain attribute sets on certain nodes: paragraph formatting on


, character formatting on nodes etc. If you need to apply some attributes to source HTML contents you can try exporting a test document with the same formatting to HTML. Basically, with some minor exceptions, we can import what we output on export. You can also ask me particular questions. Of course this all works if you can alter source HTML documents or snippets. Sorry for inconvenience.

What HTML element are you applying border attributes to? Please show me the fragment.


Hi thanks
Here is the table that i want to display with text

Here lies some text that i wanna display

If i save it with html ext. then it displays upper border, but in Aspose.pdf it do not. Can you help me plz?

Thank you for your example.<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

But would you clarify what product you are working with? This is the forum of Aspose.Words, not Aspose.Pdf. In both products HTML import is supported so there might be confusion. If you are really asking about Aspose.Pdf then I can move your thread to the proper forum.


I think problem is not in Word or Pdf, the problem is in Aspose. I am using both, pdf as well as word document, but the same result appears. I am selecting a simple html string and by using word template, i am generating both pdf and word document. The merge field that renders html text is in a saparate section.

Liaqat Ali


<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

I think you misunderstood the previous post. There are two Aspose products with allows you to convert HTML to PDF. These are Aspose.Words and Aspose.Pdf. The question is, which produce do you use? Please show me your code you use to convert your HTML to PDF. Also attach your template and sample HTML here for testing. I will check the issue and provide oyu more information.

Best regards.

I am using both Aspose.pdf, and Aspose.word as i said earlier.
and the html string i sent works perfactly when i set the width,height and back ground color of the table. I am only unable only to display the upper border(or any one border)

Best Regards

Liaqat Ali

If you are importing HTML with Aspose.Words then please try setting border attributes on cell elements.<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />


Thanks Victor!
Now it works by placing border display properties within

Here lies some text that i wanna

The issues you have found earlier (filed as WORDSNET-2021) have been fixed in this .NET update and this Java update.

This message was posted using Notification2Forum from Downloads module by aspose.notifier.