Using PHP to create a PDF from a mix of plain text and HTML text

Possible Duplicate:
Convert HTML + CSS to PDF with PHP?

I have a form with 5 fields, two of which are textboxes extended with tinyMCE, the rest are simple inputs of type text.

I need to generate a PDF from this input. I understand that I can use Zend_Pdf to generate the PDF and include the plain text data. But how, for example, can I include a bulleted list from the tinyMCE fields?

Would the best way be to create an HTML file, and then use for example DOMPDF or HTML2PDF? Ideally, I'd prefer to just use the zend framework to create the document, position and insert the fields, and save.

Thanks in advance.


More info in Convert HTML + CSS to PDF with PHP?.

In my experience, Prince XML was the Rolls Royce of such technologies so far away and above any of the other ones it's not even funny. It's expensive though. But I had all sorts of problems with all the others.


Some time ago I tried to use HTML to PDF conversion programs to convert... HTML to PDF, but in the end I gave up with that approach and just created the PDFs directly in code. I use fpdf (http://www.fpdf.org/) as a base and added supporting code for lists and grids etc.


I am using Prince XML mentioned by cletus. Results are very good, even with css styled html with floats etc. It's expensive, but it just works and saves a lots of time.

链接地址: http://www.djcxy.com/p/15572.html

上一篇: 从当前HTML页面创建PDF

下一篇: 使用PHP从纯文本和HTML文本混合创建PDF