Hi ,
Hi there,
com.aspose.pdf.Table table = new
com.aspose.pdf.Table();<o:p></o:p>
table.setColumnWidths("30% 70%");
Hi,
Hi there,
Hi,
sorry for reopening this question, but I would like to notify you of something.
I have 3 tables under each other, touching, so there’s no space between them.
First table has one 100% column, Second has five columns and the Third has two (each has default column widths set as percentages)
The problem is, that the cells have borders, and these are added to the whole width of my tables, so on the right side, the five-column table is a few pixels wider than the others. They should all be the same width, because the sum of the DefaultColumnWidths is always 100%
No rush, I solved this somehow. I added a sixth column with no border and set its width to 0.3% (lowered the fifth to 11.7%)
Just saying, it would be better to include the cell borders to the column width.
Thanks for your good work.
Thanks for posting your inquiry.
The reason of this behavior was that, API was adding width of the border into total width of the table. In order to avoid that, Aspose.Pdf offers a Boolean
property (i.e Table.IsBordersIncluded
), which can be specified during PDF generation process to tell API whether border width should be included with total width of table or not.
You may please set above mentioned property in order to resolve the issue and in case issue still occurs, please share your sample PDF document along with working code snippet, so that we can test the scenario in our environment and address it accordingly.