How to create a PDF file with PHP? [duplicate]

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?

56.2k 30 30 gold badges 207 207 silver badges 204 204 bronze badges asked Jan 12, 2011 at 7:07 293 4 4 gold badges 5 5 silver badges 13 13 bronze badges Can you be more clear: you need to create a PDF using PHP, starting from what? Commented Jan 12, 2011 at 7:10 And how is this not a duplicate of your own question from two days ago. Commented Jan 13, 2011 at 13:14

3 Answers 3

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.

answered Jan 12, 2011 at 7:09 Ahmet Kakıcı Ahmet Kakıcı 6,394 4 4 gold badges 38 38 silver badges 49 49 bronze badges

hi my question is wanna to create a new pdf file with the help core PHP code.. can you show me any demo.

Commented Jan 12, 2011 at 7:16

I don't know that did you mean with 'core' but here is an demo, powered by fpdf fpdf.org/en/tutorial/tuto1.htm

Commented Jan 12, 2011 at 7: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