Software:
News ToolsReg Shops |
Comments on ‘Build your PDF and Excel reports with PHP’Office 2.0 without the fluffPublished Monday 10th December 2007 19:43 GMT
If you can't use PECLBy Si
Posted Monday 10th December 2007 22:09 GMT
If you can't use PECL I highly recommend the FPDF class here: http://www.fpdf.org/ It's written entirely in PHP so you don't need to re-compile or install anything special to use it and it works on most versions of PHP from 4 onwards (it probably works with PHP3 but I've not tried it). That;s only basic PDFBy zac spitzer
Posted Monday 10th December 2007 23:29 GMT
But if you really want to work with PDF's you cannot beat Coldfusion 8 from Adobe. You can simply take Full blown HTML with CSS etc and create a PDF directly, plus there is deep support for doing all sorts of things with PDF. It's not open source, but if you have anything beyond basic PDF text to do or you need great looking PDF's, the cost of a standard CF license will be easily recovered Dont wanna steal your thunder...By Anonymous Coward
Posted Tuesday 11th December 2007 00:40 GMT
You could alway make it universally programtically available for excel by just making a plain html table and generate the file with a .xls extention... works perfectly! :p And the *nix version is ?By Uwe Dippel
Posted Tuesday 11th December 2007 01:41 GMT
or do you only entertain Windows boxen ? html2pdfBy Martin Beckett
Posted Tuesday 11th December 2007 02:08 GMT
Or create html (with css) and use html2pdf from php LaTeX?By Taran Ablitt
Posted Tuesday 11th December 2007 03:19 GMT
LaTex is how I generate PDFs from PHP. Output the LaTex, process into PDF then serve up and depending on the case, cache for future access. Works very well for me. ClibPDF DepreciatedBy Calum
Posted Tuesday 11th December 2007 05:42 GMT
Looks like ClibPDF is depreciated... http://de3.php.net/manual/en/ref.cpdf.php Uwe - if you mean the *nix version of this article then its identical, just different directory locations, as the scripting is all php based. however if you are talking bout the file formats then you may have a point but there is a pdf reader and open office for linux. Apache POI with PHP-Java BridgeBy Pie Man
Posted Tuesday 11th December 2007 08:48 GMT
Excel_Spreadsheet_Writer is still fairly basic. If you need more functionality, try using Apache POI from PHP. It'a actually a Java Application, but it's methods can easily be accessed from PHP using either the free or Zend PHP-Java bridge. If anyone's interested in more information james2 /at/ jfirth /point/ net Lets not forget pdftkBy Not That Andrew
Posted Tuesday 11th December 2007 09:30 GMT
The swiss army death ray of pdf toolkits. So last year...By George
Posted Tuesday 11th December 2007 09:42 GMT
This is not the best article on ElReg. The new way surely has to be Zend Framework for PDF writing. PEAR works, but ZF is superb and well structured. http://framework.zend.com/ Another vote for ZF here.By Andrew Moore
Posted Tuesday 11th December 2007 09:55 GMT
Type your comment here — plain text only, no HTML How big?By Anonymous Coward
Posted Tuesday 11th December 2007 14:21 GMT
Excuse me but what size did you say A4 was? Been There, Done ThatBy A J Stiles
Posted Wednesday 12th December 2007 11:49 GMT
I've already been generating PDF files out of Perl for some time now, just by generating PostScript (OK, so I know a bit of PostScript ..... wouldn't call myself anything like fluent, but I know how to draw simple shapes and stick text on a page) and piping it through pdf2ps. You can even insert images saved as EPS straight into the stream. It doesn't half look impressive (although that's probably more to do with the perception of PDF as being used only for highly "official" documents). As a final touch, I even detected the user's OS and offered a link to an appropriate, non-Adobe PDF reader (healthy competition is a wonderful thing). Also, if you generate a simple CSV file but give it the extension XLS, Excel will load it without missing a beat (Office doesn't really go for file extensions). You can even provide a second link to download the same file with a CSV extension (for Open Source users), so as not to scare anyone into thinking they absolutely need proprietary software. The period for commenting on this story has finished |
Developer HeadlinesThe UK's latest developer news from MSDN |
Top 20 stories • All The Week’s Headlines • Archive • Search