开发者

rtf format to pdf

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

开发者_JS百科

Thanks


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/


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


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.


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

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜