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?
php require('./fpdf. php'); $pdf=new FPDF(); $pdf->AddPage(); $pdf->SetFont('Arial','B',16); $pdf->Cell(40,10,'Hello World! '); $pdf->Output(); ?> Upon execution, the PHP script will generate a PDF file in your browser.
$pdf=new FPDF(); Example 1: The following example generates a PDF file with the given text in the code. The file can be downloaded or previewed as needed.
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.
Look into Zend_PDF from Zend Framework - it allows you to create/manipulate PDFs.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With