[FX.php List] [OFF] printable very wide table?

Joel Shapiro jsfmp at earthlink.net
Thu Dec 30 10:29:50 MST 2010


Hey all

Just a follow-up:

I've discovered an awesome new PHP>PDF class called mPDF:
http://mpdf.bpm1.com/

It has the capacity to rotate a whole table 90 degrees, or contents of  
any cell 90 degrees (or any other angle).  Unfortunately, it can't  
rotate a *really* wide table and have it spread across multiple pages  
(e.g. cols 1-30 on p1, cols 31-50 on p2...), but I've found a work- 
around that will work well for my project:  By rotating the cell  
contents 90 degrees, I can virtually turn rows into "columns" and  
columns into "rows".  This way, the varying number of columns called  
by this report will automatically flow onto as many pages as needed,  
since in actuality they'll be table rows, and those easily break along  
pages.

I don't know if I've explained it well, but for me it's a great  
solution.  Since the columns in this table will be of varying widths,  
it would have been very hard to determine appropriate page breaks  
otherwise.

FYI: mPDF apparently also supports a lot more CSS than other PHP>PDF  
classes I've looked at (FPDF, TCPDF), which seems very cool.


Happy New Year everyone!


Best,
-Joel


On Dec 15, 2010, at 3:49 PM, Joel Shapiro wrote:

> Thanks Andrew & Dale for your experiences.  I'll report back on mine  
> once I'm back to working on this project (currently in estimate/ 
> proposal mode... yuck)
>
> -Joel
>
>
> On Dec 15, 2010, at 9:53 AM, Andrew Denman wrote:
>
>> We've been using "page-break-after: always;" for a few years now  
>> with great success.  If all you want is a normal page break, this  
>> should work in all browsers.
>>
>> Andrew Denman
>>
>> -----Original Message-----
>> From: fx.php_list-bounces at mail.iviking.org [mailto:fx.php_list-bounces at mail.iviking.org 
>> ] On Behalf Of Dale Bengston
>> Sent: Tuesday, December 14, 2010 10:11 PM
>> To: FX.php Discussion List
>> Subject: Re: [FX.php List] [OFF] printable very wide table?
>>
>> In my experience, and I last smashed my head on this last week, css  
>> page-break attributes are not well supported by browsers. They work  
>> in Firefox and that's about it.
>>
>> With HTML tables, though, I don't think you really have to worry.  
>> They break pretty reliably between rows.
>>
>> Dale
>>
>> On Dec 14, 2010, at 9:42 PM, Tim 'Webko' Booth wrote:
>>
>>> Dear Joel,
>>>>
>>>> That's a clever idea.  Thanks!
>>>>
>>>> I'll be testing the CSS page-breaks once I can dive back into  
>>>> this project.  If it's not near-foolproof, I'll be going w/ PDFs.
>>>
>>> Which might be interesting as well... I'm kinda intrigued now, so  
>>> I fiddled with FPDF for a few minutes...
>>>
>>> http://apachescricket.com/table_pdf_A4.php
>>> Is set to A4 portrait, making the table off the right edge - only  
>>> prints the left hand page
>>>
>>> http://apachescricket.com/table_pdf_custom.php
>>> Is set to a custom width, with the table fitting inside - also  
>>> doesn't print properly...
>>>
>>> YMMV
>>>
>>> Webko
>>> _______________________________________________
>>> FX.php_List mailing list
>>> FX.php_List at mail.iviking.org
>>> http://www.iviking.org/mailman/listinfo/fx.php_list
>>
>> _______________________________________________
>> FX.php_List mailing list
>> FX.php_List at mail.iviking.org
>> http://www.iviking.org/mailman/listinfo/fx.php_list
>> _______________________________________________
>> FX.php_List mailing list
>> FX.php_List at mail.iviking.org
>> http://www.iviking.org/mailman/listinfo/fx.php_list
>
> _______________________________________________
> FX.php_List mailing list
> FX.php_List at mail.iviking.org
> http://www.iviking.org/mailman/listinfo/fx.php_list



More information about the FX.php_List mailing list