PHP – creating PDF online without PDFlib
I was trying to find a solution for generating PDF online. The most popular way is to use the PDFlilb. However, I am on a shared server and I do not have control over what is installed. And the server people refuse to add this.
Therefore I have to find an alternative solution. I found this and tested it – and it works!
FPDF is a PHP class which allows you 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.
All you need to do is to upload a PHP file, a CSS, and a font folder, and run the script from your page. The script can just be copied and pasted from the tutorial. And there you go – a PDF file. You can set the paper size & orientation as well.
This also supports image on the file.







