This solution uses HTML2PDF project (sourceforge.net/projects/html2fpdf/). It simply gets a HTML text and generates a PDF file.

http://www.dancrintea.ro/html-to-pdf/