I’m trying to format tables.
I order a table inside of a cell of outer table.
The inner table has 2 columns. The first column must have fixed size to avoid line breaks. The following column can have flexible size to fit into outer table cell.
The number of cells of the outer table might grow during build up time. So the size of the second inner column will shrink.
What I need is a kind of Table.ColumnWidths = “20 *”. Does that exist?
My problem would be also solved, if I could read the size of the outer cell at table creation time.
I’m using aspose.pdf 9.6.0.
I try to explain it with a very simple example. My reality is more complex.
The first column is build of text and an image in another inner table.
The text is wrapped automatically, thanks for that, in the first cell.
The size of the first column is fixed due to the image in the second cell which is not allowed to be shrinked.
The second column is fixed size due to image which is again not allowed to be shrinked.
The third column is variable, because it contains text only.
To calculate the latest column width I must step through all the content of the nested tables, look for images (and their sizes) and do the necessary settings on basis of the page width.
So my hope was for a simpler solution like:
Table.ColumnAdjustment = ColumnAdjustmentType.AutoFitToWindow;
Table.ColumnWidths = InnerTable.Width +" " + Image.Width + " *".
Thanks for good ideas.
PS: In your example in
http://www.aspose.com/docs/display/pdfnet/Placing+a+text+around+an+image you know the sizes of the columns.