How to convert HTML to PDF using PHP 5 18Feb, 2010

How to convert HTML to PDF using PHP 5

There are many tools on the internet that allow you to convert files of various formats to PDF – but sometimes you need to make such conversions using your code. In this article, we’ll specifically discuss how to convert an HTML file or content to a PDF file using PHP 5. For the task at hand, we’ll be using Dompdf – a CSS2.1 compliant HTML layout and rendering engine written in PHP. It is a style-driven renderer – it will download and read external stylesheets, inline style tags, and the style attributes of individual HTML elements. It also supports most presentational HTML attributes. Installation Download the latest stable version of Dompdf, additionally you can also download the detailed documentation if…

Posted in: HTML, PDF, PHP