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.
It would be great if IsBordersIncluded
defaulted to true, since that’s probably the expected behavior for a majority of use cases. If there’s a reason to keep it as-is, I’d love to know.
We need to check the technical background and history of this property at our end. We will collect related information and let you know soon.
There isn’t any specific reason and we have logged a feature request as PDFNET-58565 in our issue tracking system to make it true by default. As soon as the ticket is resolved, we will inform you. Please spare us some time.
Thank you very much. No rush