When changing a table’s column widths via the table object’s “columnWidths” attribute, the table’s columns will not be rendered correctly.
For example, consider the following table:
Clicking on the “Expand Columns” button sets the width of the first column to 2 inches and the width of the second column to 3 inches with the following script:
Table1.columnWidths = "2in 3in";
In Acrobat 8.0 or earlier, this is the result:
The problem is that the table’s layout hasn’t been properly updated after the changes to its column width attribute.
Fortunately, there’s a simple workaround to this problem which consists in forcing an update to the layout after setting the column widths of a table:
Table1.columnWidths = "2in 3in"; xfa.layout.relayout();
Note that a lot of these table rendering issues have now been addressed in Acrobat/Reader 8.1.
When using the above workaround or Acrobat/Reader 8.1, this is the result you get:
Please refer to the Bug List for updated information on the version(s) affected by this bug as well as if and when it was/will be fixed.
Posted by Stefan Cameron on June 13th, 2007
Filed under Acrobat,Bugs
Both comments and pings are currently closed.