Page 1 of 1

Table sizing

Posted: 22 Apr 2009, 17:55
by danieli
Greetings!

I am pretty impressed with this "Alpha" component... fast and quite accurate.

The only issue I have found in my limited testing is how tables are handled.

For example, I haver a 2X2 table with no widths set. In the normal content, it autosizes and stretches as it can based on what is inside the cells.

========================
| Label .| Long Description |
========================
| Label2 | Long Description |
========================

However, Phoca PDF see's this, makes the table span the page (which is correct), but splits the width between the columns... making the table look odd.

=================================
| Label............. | Long Description |
=================================
| Label2............ | Long Description |
=================================

With this logic be adjusted as the module matures?

Re: Table sizing

Posted: 24 Apr 2009, 22:10
by Jan
Hi, try to change some style of the table, table is imported into the PDF by TCPDF, so if any change in html code will not help, then this needs to be hardcoded in TCPDF class :-(

Jan

Re: Table sizing

Posted: 15 Sep 2009, 23:41
by GeorgeLangley
Hi Jan. What I am finding is; width settings in one row are ignored for subsequent rows within the same table.

Code: Select all

<table style="width: 700px;" cellpadding="0" cellspacing="0" border="0">
<tbody>
<tr>
<td colspan="4" class="listtitle">Top Title</td>
</tr>
<tr>
<td style="width: 80px;" class="rowheader">First Heading</td>
<td style="width: 100px;" class="rowheader">Second Heading</td>
<td style="width: 200px;" class="rowheader">Third Heading</td>
<td style="width: 320px;" class="rowheader">Fourth Heading</td>
</tr>
<tr>
<td class="rowdata">Content one</td>
<td class="rowdata">Content two</td>
<td class="rowdata">Content three</td>
<td class="rowdata">Content four</td>
</tr>
</table>
The result is the "Headings" are formatted according to the widths, but the "Contents" become equal widths (700/4) and do not line up with their headings. There are no widths set in any of the classes used here.
Is there a setting in one of the TCPDF files to change this, is it a TCPDF bug, or is PhocaPDF not accessing some feature (possibly the MultiCell calls) in its connection to TCPDF?
Any info appreciated. Thanks!

Re: Table sizing

Posted: 17 Sep 2009, 16:03
by Jan
Hi, try to set pt instead of px values, maybe this will help. No idea what can be wrong there :(