Report Markup Language is an XML-style language for creating PDF documents.
We've just written a sample PHP project demonstrating how to use ReportLab's RML2PDF to create PDF documents from inside your PHP web application.
Create great looking custom dynamic PDFs from your website or application with the minimum of fuss.
Download the sample project from here:
http://www.reportlab.com/software/documentation/sample-projects/rml-with-php/