绑定到poppler-qt4的python

python-poppler-qt4的Python项目详细描述


libpoppler-qt4的一个python绑定,目的是实现完整性和 积极维护。

由wilbert berendsen<;wbsoft@xs4all.nl>;创建和当前维护。

主页:https://pypi.python.org/pypi/python-poppler-qt4/

用法:

import popplerqt4
d = popplerqt4.Poppler.Document.load('file.pdf')

文档

Python API紧跟Popter QT4 C++接口库API, 记录在http://people.freedesktop.org/~aacid/docs/qt4/

C++的API需要^ {TT1} $,^ {Tt2} $或^ {TT3}$,任何 可以使用python序列。 api调用返回QListQSetQLinkedListall返回python 名单。

有一些不同:

Poppler::Document::getPdfVersion(int *major, int *minor)可以是 称为d.getPdfVersion(),(其中dPoppler::Document 实例);它将返回一个由两个整数组成的元组(major、minor)。

Poppler::FontIterator(由Poppler::Document::newFontIterator返回) 也是一个python iterable(例如有__iter__()__next__()方法)。 因此,尽管您可以使用:

it = document.newFontIterator()
while it.hasNext():
    fonts = it.next()  # list of FontInfo objects
    ...

您也可以使用更具Python性的:

for fonts in document.newFontIterator():
    ...

除了poppler名称空间之外,还有两个顶级模块 功能:

^{tt15}$
returns the version of the ^{tt16}$ package as a tuple of ints, e.g. ^{tt17}$.
^{tt18}$

returns the version of the linked Poppler-Qt4 library as a tuple of ints, e.g. ^{tt19}$.

This is determined at build time. If at build time the Poppler-Qt4 version could not be determined and was not specified, an empty tuple might be returned.

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

推荐PyPI第三方库


热门话题
java将数据从一个输入流传输到多个输出流的最佳方式   java如何使用反射机制调用驻留在具有默认可见性的基类中的公共方法?   在Java中将两个不同的方法调用为一个方法   集合的最佳Java线程安全锁定机制?   java在gae中存储json字符串   PHP/Java桥。如何从php服务器连接到桌面应用程序   java Spring:无法持久化用@JsonIgnore注释的实体   基准测试中的java非确定性分配行为   JavaSpring:使用Spring安全性为执行器端点配置安全性   java扩展spring应用程序上下文的最佳方式是什么?   在Mac OS上使用Java向终端窗口发送一些输入   java addInputStream(InputStream InputStream)方法失败   java为什么下面的代码打印为false?   java错误:类按钮中的addActionListener方法无法应用于给定类型;   java在spring数据jpa投影中使用嵌入式值对象   java访问匿名内部类中的变量的干净方法是什么?   java将POJO转换为JSON只返回“id”字段   jvm热点我在哪里可以找到MemoryConsumer。测试内存消耗的java程序?