rtf format to pdf

北城余情 提交于 2019-11-30 18:01:06

问题


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

Thanks


回答1:


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/



回答2:


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




回答3:


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.




回答4:


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



来源:https://stackoverflow.com/questions/2019017/rtf-format-to-pdf

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!