I suggest you to use a free PHP Class FPDF to generate PDF files with pure PHP version PHP 5.1 at least
you can edit Page header and footer too and it's supporting (JPEG, PNG, and GIF) Image and UTF-8 Unicode.
Then you must upload the files to your site
<?php require('fpdf.php'); $pdf = new FPDF(); // you can change the constructor value FPDF('P','mm','A4'); $pdf->AddPage(); $pdf->SetFont('Arial','B',16); // font size is given in points, not millimeters $pdf->Cell(40,10,'Hello World!'); $pdf->Output(); ?>
When you try to run the previous code the document is closed and sent to the browser with Output() function
You can also see the many examples available on the official website Tutorials