9

Possible Duplicates:
Convert HTML + CSS to PDF with PHP?

I am working with my new project. I want to generate a new PDF file with the help of PHP code.

How can I do this? Do you any have any ideas?

ROMANIA_engineer
  • 54,432
  • 29
  • 203
  • 199
magna
  • 293
  • 4
  • 5
  • 13
  • Can you be more clear: you need to create a PDF using PHP, starting from what? – bluish Jan 12 '11 at 07:10
  • 2
    And how is this not a duplicate of [your own question](http://stackoverflow.com/questions/4655941/how-to-convert-the-php-file-in-to-pdf-file) from two days ago??? – Benjol Jan 13 '11 at 13:14

3 Answers3

17

You can try free libraries like fPdf

FPDF is a PHP class which allows to generate PDF files with pure PHP, that is to say without using the PDFlib library. F from FPDF stands for Free: you may use it for any kind of usage and modify it to suit your needs.

Ahmet Kakıcı
  • 6,294
  • 4
  • 37
  • 49
  • hi my question is wanna to create a new pdf file with the help core PHP code.. can you show me any demo. – magna Jan 12 '11 at 07:16
  • 2
    I don't know that did you mean with 'core' but here is an demo, powered by fpdf http://www.fpdf.org/en/tutorial/tuto1.htm – Ahmet Kakıcı Jan 12 '11 at 07:25
  • i visited that demo could you understand what im telling i want to generate a new pdf file with the help of php code – magna Jan 12 '11 at 07:34
  • Yep i understood and the page shows that too. It's php and creating a pdf file. Not enough? – Ahmet Kakıcı Jan 12 '11 at 07:38
3

Look into Zend_PDF from Zend Framework - it allows you to create/manipulate PDFs.

StasM
  • 10,593
  • 6
  • 56
  • 103
  • can't do with php.. is there any need for use zend frame work – magna Jan 12 '11 at 07:37
  • @magna with default PHP - no, you need either a library (one of which is Zend_PDF) or an extension - e.g. http://us2.php.net/pdf – StasM Jan 12 '11 at 09:17
3

Use Zend_PDF I guess.

Check the documentation here: http://framework.zend.com/manual/en/zend.pdf.html

It's the best PDF generator for PHP IMO.

bertzzie
  • 3,558
  • 5
  • 30
  • 41