基于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首选项相同getPreference()值的不同数据   字符串如何在Java中连接两个列表中的单词   安卓 Java Socket编程:检测客户端和服务器是否连接   使用JTextField的java无法将值转换为int   在java中,如何在不通过超级构造函数设置的情况下将消息设置为自定义异常类   用于标识属性值的java正则表达式模式   Android中的java不可见谷歌地图   java正确取消启动ExecutorService的JavaFX任务   在非活动java类中使用安卓的融合位置提供程序,并在主活动类中获取经度和纬度   spring为什么我的大摇大摆不能用springboot在java中工作?   java JSF(2.2)ViewScope在Weblogic 12.2.1.2和JDK 8上使用Spring 4.3.7(在Mac OS和Docker Oracle Linux环境上)   java如何用一个按钮提高计时器速度   java如何检查字符是否是元音?   注册表引用了不存在的Java运行时环境安装或运行时已损坏错误   来自ResultSet java的mysql getDateTime   maven LanguageTool Java API是否具有“无用”依赖关系?   twitter api身份验证的java Trycatch问题   java在Apache Struts 1.1中是否可以显式白名单?   安卓致命异常:主java。lang.RuntimeException:被问及未知片段