Unzip the library files in to the directory where your php file is located.
Write the following code into the php file.
$pdf = new FPDF();
$pdf->Cell(40,10,'New Pdf file created.');
Run the code, you can find a new pdf file created. You can save the file if you need, or take a print out. Here inside the brackets of “require” give the address of fpdf file which will be inside the downloaded library. Here I placed the files inside “fpdf182” directory.
You can set the font of the text which is to be written inside the pdf.
In $pdf->Cell(40,10,'New Pdf file created.');
40 and 10 is the position of the text and “New Pdf file created.” Is the text which is to be written inside the file.