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

Free Support Forum - aspose.com

Table layout issues when converting to PDF -- columns too narrow

We are converting the attached html file to PDF, but the generated table columns are too narrow.
Any ideas?

This is what we link against:



Hi Margaret,

Thanks for your inquiry. Please note that Aspose.Words mimics the same behavior as MS Word does. If you load the same html in MS Word, table’s contents are moved outside the page. There are some tables in your input Html which have size greater then normal page size. In your case, we suggest you please increase the page size and set table’s width to 100% as shown in following code example.

Hope this helps you. Please let us know if you have any more queries.

Document doc = new Document(MyDir + "in.html");
for (Table table : (Iterable)doc.getChildNodes(NodeType.TABLE, true))
doc.save(MyDir + "Out.pdf");