gpt4 book ai didi

php - 我如何使用 php 与 openoffice 通信

转载 作者:塔克拉玛干 更新时间:2023-11-03 02:01:28 24 4
gpt4 key购买 nike

我有 ubuntu 并安装了 openoffice。有什么方法可以使用 php 将我的文档转换为 odf?有没有办法让 php 与已安装的应用程序通信?

最佳答案

PyODConverter ( http://artofsolving.com/opensource/pyodconverter )

这是一种通过命令行使用 OpenOffice/LibreOffice 转换文档的简单快捷的方法。您可以使用 exec() 从 PHP 传递命令

1) 使用 libreoffice -headless -accept="socket,host=127.0.0.1,port=8100;urp;"在服务器上启动 Openoffice 作为服务-nofirststartwizard。将命令“libreoffice”更改为“soffice”(对于 openoffice,如果有的话)。

2) 下载 DocumentConverter.py 并像这样使用它:python DocumentConverter.py test.docx test.odf

就是这样。

关于php - 我如何使用 php 与 openoffice 通信,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7640772/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com