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

Free Support Forum - aspose.com

HTML Table to PDF


I’m passing a HTML table contents as a text to PDF as below:

Aspose.Pdf.Text text1 = new Aspose.Pdf.Text(divTable.InnerHtml);
text1.IsHtmlTagSupported = true;

The text in cells are getting wrapped. The cell takes multiple lines which is not preferred as I’ve blank spaces on both the sides. I tried the following steps.

1. Setting the left and right margins to be 0.

2. Setting the column width on the HTML table cell. (making 2 of the columns to be 250 px and 4 of them to be 100 px)

3. Set the text’s rendering mode to be filltext

4. Making the font- size smaller.

But nothing works. I really appreciate your suggestions here. Thanks in advance.


Can you please share the source HTML contents so that we can test the scenario at our end. If possible, can you please share some picture/sample output document which can give us an idea regarding the expected output.

We apologize for your inconvenience.