Open source php doc/x to pdf conversion?

走远了吗. 提交于 2020-02-03 10:52:26

问题


Are there any open source PHP tools that i can use to convert .doc / .docx to pdf ?

If you have any good tutorials or tools that would be greatly appreciated .

I was looking into phpLiveDocx but looks like they charge monthly.

Or maybe an .odt to pdf in php or linux ?


回答1:


Try FPDF(dot)org. Dunno if it's open source but it seems easy to understand & use.

EDIT: Didn't notice that it didn't do conversions. Maybe this blog post will help: Word to PDF conversion using OpenOffice on Windows. Hopefully that works. If not, I have no idea.




回答2:


For a PHP-specific option check out PHPWord - this library is written in pure PHP and provides a set of classes to write to and read from different document file formats (including .doc and .docx)

Alternatively if you want an even easier life you could use a commercial API such as Zamzar. This service has been around for 10+ years and provides an API for file conversion which you can call directly from PHP.

Full disclosure: I'm the lead developer for the Zamzar API.



来源:https://stackoverflow.com/questions/6131526/open-source-php-doc-x-to-pdf-conversion

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