基于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

如果名单上有人失踪,请告诉我们!

欢迎加入QQ群-->: 979659372 Python中文网_新手群

推荐PyPI第三方库


热门话题
java迭代图形框架聚合达到内存限制的消息   反编译和开发人员向Android应用程序提供java安全密钥   活页夹中的java Vaadin上传组件,例如Crud编辑器   java如何定义0090当我有了每个字符   带有AOP的java截取私有注释方法   在Java中暂停并恢复动画(thread.sleep)   java在JavaFX中从不同的控制器向TableView添加行   java如何通过Spring使用脚本初始化inmemory HSQLDB   windows找到了绝对的java。通过编程从java代码获取exe路径   Java同步、信号量和队列的多线程性能   java异步任务回调未调用   java在迷宫中用坐标寻找最短路径   Java:并行处理数组,查找发生异常的位置   java我无法理解我收到的错误   如何调用。bat文件,并使用java中的ProcessBuilder发送字符串   java在mysql数据库中插入日期   将ArrayList的内容显示为格式正确的JSON for Java REST API   java@OneToMany注释SQLSyntaxErrorException:ORA000904无效标识符