Link to home
Start Free TrialLog in
Avatar of dirknibleck
dirknibleck

asked on

Producing multi-page pdf or excel table-formatted report from PHP/MySQL on the fly

I have to produce a fairly large (50ish page) report of analytical data in table format from a PHP/MySQL app on the fly. Can anyone recommend a good solution?

I've looked at fpdf, but I'm unsure about how to manage formatting of the table and page-breaks. With PHPExcel I'm concerned about available memory. Dom2pdf I've just started looking at, but I'm not sure if it's the right solution.

I guess I'm just looking for some ideas and best-practices.
Avatar of Ray Paseur
Ray Paseur
Flag of United States of America image

I would use FPDF; it has been my friend on many occasions.  But that said, you have a lot of work ahead of you, no matter which solution you choose.  It is different to use HTML which is a markup language, vs PDF which is a layout language.  If you want to use a layout language to facilitate printing you need to think about layout instead of semantic markup.

Let's try this... Create a small one-or-two page "temporary table" PHP and MySQL app that writes the output to the browser.  Then show us how that output should be written to the report of analytical data.  Maybe we can show you a design pattern that would work with FPDF or a similar technology.
Have you looked at TCPDF? It was originally forked from fpdf and has a lot more features which may or may not make your life easier including the ability to convert HTML+CSS into PDF pages.
ASKER CERTIFIED SOLUTION
Avatar of dirknibleck
dirknibleck

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of dirknibleck
dirknibleck

ASKER

Time constraints led me to take a bet on a quick solution. It seems to have worked out for me.
Let's see... We asked you for some test data.  What did we get?  No test data, and your choice is "blowing through memory like crazy?"  Is this really a solution?
I asked for ideas and best-practices. What did I get? A request for data and suggestions of plug-ins.

I truly appreciate that you took the time to answer, but you didn't really maintain the direction of this question and my time constraints didn't offer me the opportunity to engage your path.

Ultimately I have a solution that works for my immediate needs and no time to pursue a better offering. I suppose I could have opted to simply delete the question. I'm open to that if the moderators prefer.