Table sizing

Phoca PDF - creating PDF documents in Joomla! CMS
danieli
Phoca Newbie
Phoca Newbie
Posts: 4
Joined: 20 May 2008, 18:19
Location: Canada

Table sizing

Post 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?
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 48386
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Table sizing

Post 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
If you find Phoca extensions useful, please support the project
GeorgeLangley
Phoca Newbie
Phoca Newbie
Posts: 3
Joined: 10 Aug 2009, 21:02

Re: Table sizing

Post 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!
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 48386
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Table sizing

Post by Jan »

Hi, try to set pt instead of px values, maybe this will help. No idea what can be wrong there :(
If you find Phoca extensions useful, please support the project
Post Reply