FPDF Output Methods for PDF Files in PHP

FPDF is a PHP class which allows you to generate PDF files with purePHP, that is to say without using the PDFlib library.

For those who are already familiar with FPDF, this post will show you how to output your PDF file using FPDF. There are 4 methods that you can use according to your own needs:

    • Method 1: Saving the PDF to a file:
    • Method 1 (for server): Saving the PDF file to server (make sure you have 777 writing permissions for that folder!):
    • Method 2: Prompting user to choose where to save the PDF file:
    • Method 3: Automatically open PDF in your browser after being generated:
    • Method 4: Returning the PDF file content as a string:
$pdf->Output('', 'S');



source: https://phpexcel.codeplex.com/discussions/227620

One response to “FPDF Output Methods for PDF Files in PHP”

Leave a Reply

Your email address will not be published. Required fields are marked *