PHP and PDF examples/How to 
Author Message
 PHP and PDF examples/How to

I'm heading towards the end of developing a system using PHP, MySQL, XML
and Javascript. The final module is a printed report that I wan't to do
in PDF.

The report will be run from the server, so it'll be straight PHP->PDF.
Can anyone recommend a good place to start for learning about how to do
this?

This is my first PHP project. I was going to buy a book on PHP/MySQL/PDF
but so far I haven't really needed one. Google has come up with goods
every time so far.

BTW - I'm not a newbie programmer, so I don't need to learn the basics.
I have experience in computer typesetting also, so I really just need a
  good reference on PDF and how to drive it from PHP.

Thanks.

Steve



Mon, 27 Jun 2005 15:53:30 GMT  
 PHP and PDF examples/How to
Hi,

There's a couple of ways to do this - the PHP documentation describes
two modules which can be loaded directly into PHP (ClibPDF and
PDFLib), or there's my favourite way which is to use FPDF
(www.fpdf.org).  I prefer FPDF because it's very uncompicated; it's
written entirely in PHP so there's no dynamic loading of modules
needed, which makes it nicer to put onto a client's server.  All you
have to do is include the class definition in your PHP script, and add
certain functions. The documentation and examples are good, I learnt
how to do it without to much trouble.

Kevin



Mon, 27 Jun 2005 10:30:59 GMT  
 PHP and PDF examples/How to
I think the true solution would be PDFLib. It's a C library
though and somewhat complicated.

For a quick and dirty (and free) option look at PHPPdf.
http://www.ros.co.nz/pdf

It even does a resonable stab at tables for you.



Mon, 27 Jun 2005 17:49:02 GMT  
 PHP and PDF examples/How to

Quote:

> I'm heading towards the end of developing a system using PHP, MySQL, XML
> and Javascript. The final module is a printed report that I wan't to do
> in PDF.

> The report will be run from the server, so it'll be straight PHP->PDF.
> Can anyone recommend a good place to start for learning about how to do
> this?

Just to give you another route to try, for fairly simple PDFs (text,
lines, images) I've had a lot of success with PDF4PHP.

http://www.gnuvox.com/pdf4php/

Cheers,

--
Andy Jeffries
Linux/PHP Programmer
http://www.andyjeffries.co.uk/

- Windows Crash HOWTO: compile the code below in VC++ and run it!
main (){for(;;){printf("Hung up\t\b\b\b\b\b\b");}}



Mon, 27 Jun 2005 22:08:32 GMT  
 
 [ 4 post ] 

 Relevant Pages 

1. php and pdf

2. Using PHP to fill data on a PDF

3. PHP, PDF, and FDF - problem with PHP4 default Content-Type: text/html

4. searching in word document (or exell or pdf etc) with a php script

5. Recherche de fichiers PDF en PHP

6. PHP and PDF

7. Search some String in PDF with PDF.OCX

8. Appendix.pdf - Appendix.pdf (0/6)

9. extract info from pdf doc,PDF to XML, HTML

10. CL-PDF the Common Lisp PDF Library 0.2

11. CL-PDF: need beta testers for cl-pdf 1.0

12. CL-PDF 0.45 (The Common Lisp PDF Library)

 

 
Powered by phpBB® Forum Software