基于pyuno的py3o驱动程序
py3o.renderers.pyuno的Python项目详细描述
py3o的pyuno
py3o.renderers.pyuno是py3o转换的基于pyuno的驱动程序 将OpenOffice文档转换为PDF或其他受支持的格式。
先决条件
您需要安装open-/libreoffice的版本。
这已经在linux上的libreoffice 4.0和linux上的libreoffice4.2中进行了测试。 Mac OS X.
重要提示
窗口
Pyuno驱动程序当前不支持Windows(欢迎使用修补程序!)是的。 建议使用基于Java的驱动程序py3o.renderers.juno 很容易在windows上部署。
Linux/Mac OS X
如果您使用的是Linux或Mac OS X,则此驱动程序将与您的系统一起工作 只要pyuno安装正确。无法调用 pyuno bride如果open-/libreoffice附带的python与 版本为系统python。为了避免这个问题,司机试图 确定到open-/libreoffice的python版本的路径并生成 在此python环境中运行的转换的子进程。
用法
显式输出格式示例:
from py3o.renderers.pyuno import Convertor c = Convertor() c.convert("py3o_example.odt", "py3o_example.out", "pdf")
猜测输出格式的示例:
from py3o.renderers.pyuno import Convertor c = Convertor() c.convert("py3o_example.odt", "py3o_example.pdf")
带有显式主机和端口的示例:
from py3o.renderers.pyuno import Convertor c = Convertor(host="127.0.0.1", port="8997") c.convert("py3o_example.odt", "py3o_example.pdf")
有关更多信息,请阅读api文档。
许可证
此软件是根据麻省理工学院的许可证授权的
更改日志
0.5 2014年11月20日
- Ignore errors of ended spawned office clients if the cause of the error was a signal. Older versions of OpenOffice sometime fail with sigsev (11) after the document conversion.
0.4 2014-11-07
- Allow to specify search path for the office installation
- Allow to guess the output format from the output file extension
- Support the system python environment when running the conversion
- Support for older Office-/Libreoffice versions which don’t understand – parameters (e.g. OpenOffice 3.2)
0.3 2014年10月14日
- Support for Mac OS X
- Using the new common package for format declarations py3o.formats
- Fixed problems with starting the OfficeSpawnedClient within the Open/-LibreOffice python environment
按字母顺序排列的参与者
- Aide Florent
- Björn Ricks
如果名单上有人失踪,请告诉我们!