PHP Script to create PDF document using FPDFDownload FPDF from here.
Keep the fpdf.php file in your working directory, keep the font directory in the same place.
Run this code , you are ready with your first pdf file created from FPDF class.
In the above code we have used cell to add our text to the pdf file. We have just added one line 'Hello World' and created the pdf file. Here is the details of Cell
Try to change the script by adding backgroud color like this.
We used $pdf->Output('my_file','D') to get output directly. This line will force download to user machine the pdf file my_file.pdf. We can change this to save the file in local ( server ) side machine.