jose
jose

Reputation: 464

rtf format to pdf

Is there any way to convert rtf format to pdf using PHP?

Thanks

Upvotes: 4

Views: 13344

Answers (4)

Joeri Sebrechts
Joeri Sebrechts

Reputation: 11146

If you want to stick with pure PHP, you can probably use HTML as an intermediary:

  1. Convert RTF to HTML
    http://freshmeat.net/projects/rtf2htm/ , http://www.phpclasses.org/package/1930-PHP-RTF-to-HTML-converter-with-latin-character-support.html
  2. Optionally: clean up the HTML
    http://htmlpurifier.org/
  3. Convert HTML to PDF
    http://dompdf.github.io/

Upvotes: 4

WebGuru
WebGuru

Reputation: 9

You should try out livedocx livedocx.com . The latest Zend Framework 1.10 has a ready built module to help you out. You can read more about it at this place http://www.phpfreaks.com/tutorial/template-based-document-generation-using-livedocx-and-zend-framework

Upvotes: 0

DrDol
DrDol

Reputation: 2240

Ted is the tool you're looking for. Ted brings also a script called rtf2pdf.sh you can execute by PHP to create a PDF file.

Upvotes: 2

Ivan Krechetov
Ivan Krechetov

Reputation: 19220

You can use OpenOffice command line interface for that. Check my answer to a similar question.

Upvotes: 2

Related Questions