Forum Bugs

Form fields in tables treated as wrong width for table layout purposes

David J Prokopetz
Here's a weird one. When a text form field appears in a table, and the field's width is set via CSS, it appears that it's treated as occupying its default width for the purpose of table layout.

In the attached example, the fields in the first table have no width set. As you can see, their default width is wider than the column they occupy (all table cells are set to 50% width), so the layout engine stretches the column to accommodate them. As far as I can see, this behaviour is correct.

In the second table, the fields have an explicit width set via CSS. The fields themselves are rendered correctly; however, the column they occupy is still stretched as though the fields had their default width.

Finally, in the third table, the fields have an implicit width set via the "size" HTML param. In this case, they're treated as their displayed width for table layout purposes, and the column they occupy is not stretched.

These examples were generated using the latest build.
  1. form-fields-in-tables.html1.5 kB
  2. form-fields-in-tables.pdf75.7 kB

Edited by David J Prokopetz

Thanks, this has been fixed in the latest build.
There is also a new CSS property -prince-pdf-form-field-font-size: normal | auto (defaulting to normal) that allows text inputs in PDF forms to automatically size the text to fit the available space.