views:

92

answers:

4

What I am wanting to do is create a PDF ideally from HTML code. I found a class called dompdf but I'm having issues with font and page breaks.

Does anyone know of another script or even a better way in general to generate PDF files?

The reason why I am converting HTML to PDF is because I want someone to use a WYSIWYG editor to create the contents and click save to generate their PDF file...

Any input would be greatly apprecaited

A: 

If you don't mind a bit of work then you can use Cairo to generate PDFs.

Ignacio Vazquez-Abrams
+1  A: 

i use this class TCPDF :

http://www.tecnick.com/public/code/cp_dpage.php?aiocp_dp=tcpdf

Haim Evgi
A: 

You can take a look at html2fpdf. It can accept very basic html and css.

webbiedave
+1  A: 

Due to the different nature of PDF and HTML you'll always have to make a few comprimises when trying to convert HTML into PDF.

If this doesn't bother you too much, I'd get started with TCPDF. Its easy to use and has a fairly good grasp of colors, sizes and some other style related HTML attributes.

Björn