基于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中以反射方式使用泛型参数调用方法?   java分配给另一个变量的变量是否更改(原始变量更改)第二个变量是否更改?   java没有此类元素异常(警告:服务器未提供任何stacktrace信息)   java检查用户是否经过密码验证或与某个提供者进行了验证   java在向“价格”和“数量”列单元格添加数据时更新JTable中的“金额”列单元格   Android Studio找不到java编译器   java“在foo类的公共方法中,哪个变量(实例或本地)起作用?”   java动态Log4j2 LogfilePath   java使用OO编程避免多个嵌套if   java有没有办法在IntelliJ更改跟踪中突出显示未保存或更改的行   Java中两个矩阵相乘的数组   java打印包含阿拉伯字符的字符串会导致问号。如何修复?   java为什么声明整型静态会导致代码中出现错误?   java在使用@Bean Spring注释创建Bean时遇到异常   java是否将JavaCV添加为依赖项,以便在Raspberry PI上运行?   java如何使用trycatch测试注入的mock   java如何在不同的环境(开发、测试、生产)中维护相同的数据表?   java将Char转换为KeyEvent