Free Support Forum -

Dynamic Table Cell/Column Sizing

Hello All:

I am evaluating Aspose.PDF right now and all looks great, one thing I
need to do over and over again is have dynamic sizing columns/cells in my
tables. The effect I am after is similar to the effect you would get
with the following code in HTML:

this is a test this test a test this this is a test this is a test this is a test
this this is a test t this is this is a this

I tried this in XML and slammed it into the Pdf builder and everything seems to be statically set:

this is a test

this test

a test


this is a test this is a test

this is a test

Does it support dynamic sizing at all – I believe it will do everything else I need?

If the answer is on the site I appologize for wasting your time but I cannot find the hard answer…

Thank you for your help!



Aspose support dynamically resizing a table cell to fit its
contents. The following two lines of pseudo-code demonstrate this:

nMaxColWidth = Table.GetMaxColumnWidth(nColIndex)

Table.SetColumnWidth(nColIndex, nMaxColWidth)

Good luck!


Hi Natan,

Thanks, unfortunately, I will not have access to the API portion of the tool for this particular project – can I access a similar concept from the XML? I need the dynamic support at the XML level.


Thanks for considering Aspose.

Please refer to

The setting in the Example's XML would be useful to u.

Dynamic adjustment for column width is not supported. You can only set column width with fixed value or percentage.