• Home
  • History
  • Annotate
Name Date Size #Lines LOC

..03-May-2022-

demo/H22-Nov-2019-6244

.gitignoreH A D22-Nov-201943 76

ChangeLogH A D22-Nov-2019457 1910

INSTALLH A D22-Nov-20191.6 KiB6339

LICENSEH A D22-Nov-2019820 1813

MANIFEST.inH A D22-Nov-2019127 65

README.rstH A D22-Nov-20192.4 KiB7450

TODOH A D22-Nov-2019441 1410

demo.pyH A D22-Nov-20191 KiB5033

poppler-annotation.sipH A D22-Nov-201930.8 KiB1,2311,050

poppler-convert.sipH A D22-Nov-20192.1 KiB8874

poppler-document.sipH A D22-Nov-20195.1 KiB161154

poppler-embedded-file.sipH A D22-Nov-2019531 2621

poppler-font-info.sipH A D22-Nov-2019671 3732

poppler-font-iterator.sipH A D22-Nov-2019735 3428

poppler-form.sipH A D22-Nov-20197.1 KiB256220

poppler-link-destination.sipH A D22-Nov-20191.1 KiB4842

poppler-link.sipH A D22-Nov-20196.6 KiB288243

poppler-media.sipH A D22-Nov-2019710 3625

poppler-movie-object.sipH A D22-Nov-2019469 2722

poppler-opt-content-model.sipH A D22-Nov-2019978 3423

poppler-page-transition.sipH A D22-Nov-2019977 5042

poppler-page.sipH A D22-Nov-20193.2 KiB9791

poppler-qt5.sipH A D03-May-20221.2 KiB5944

poppler-sound-object.sipH A D22-Nov-2019642 3429

poppler-text-box.sipH A D22-Nov-2019434 2217

project.pyH A D03-May-20223.2 KiB9073

pyproject.tomlH A D03-May-20221,011 3835

setup.cfgH A D22-Nov-201925 32

setup.pyH A D22-Nov-201912.9 KiB388296

timeline.sipH A D22-Nov-2019334 1918

types.sipH A D03-May-20226.5 KiB336257

version.sip.inH A D03-May-2022396 2215

README.rst

1==================
2python-poppler-qt5
3==================
4
5A Python binding for libpoppler-qt5 that aims for completeness and for being
6actively maintained.
7
8Created and currently maintained by Wilbert Berendsen <wbsoft@xs4all.nl>.
9
10Homepage: https://pypi.python.org/pypi/python-poppler-qt5/
11
12
13Usage::
14
15    import popplerqt5
16    d = popplerqt5.Poppler.Document.load('file.pdf')
17
18
19Documentation
20-------------
21
22The Python API closely follows the Poppler Qt5 C++ interface library API,
23documented at http://people.freedesktop.org/~aacid/docs/qt5/ .
24
25Note: Releases of PyQt5 < 5.4 currently do not support the QtXml module,
26all methods that use the QDomDocument, QDomElement and QDomNode types are
27disabled. This concerns the ``Document::toc()`` method and some constructors
28and the ``store()`` methods in the ``Annotation`` subclasses. So, using
29PyQt5 >= 5.4 is recommended.
30
31Wherever the C++ API requires ``QList``, ``QSet`` or ``QLinkedList``, any
32Python sequence can be used.
33API calls that return ``QList``, ``QSet`` or ``QLinkedList`` all return Python
34lists.
35
36There are a few other differences:
37
38``Poppler::Document::getPdfVersion(int *major, int *minor)`` can simply be
39called as ``d.getPdfVersion()``, (where ``d`` is a ``Poppler::Document``
40instance); it will return a tuple of two integers (major, minor).
41
42``Poppler::Document`` has ``__len__`` and ``__getitem__`` methods, corresponding
43to ``numPages()`` and ``page(int num)``.
44
45``Poppler::FontIterator`` (returned by ``Poppler::Document::newFontIterator``)
46is also a Python iterable (e.g. has ``__iter__()`` and ``__next__()`` methods).
47So although you can use::
48
49    it = document.newFontIterator()
50    while it.hasNext():
51        fonts = it.next()  # list of FontInfo objects
52        ...
53
54you can also use the more Pythonic::
55
56    for fonts in document.newFontIterator():
57        ...
58
59In addition to the Poppler namespace, there are two toplevel module
60functions:
61
62    ``popplerqt5.version()``
63        returns the version of the ``python-poppler-qt5`` package as a
64        tuple of ints, e.g. ``(0, 18, 2)``.
65
66    ``popplerqt5.poppler_version()``
67        returns the version of the linked Poppler-Qt5 library as a
68        tuple of ints, e.g. ``(0, 24, 5)``.
69
70        This is determined at build time. If at build time the Poppler-Qt5
71        version could not be determined and was not specified, an empty
72        tuple might be returned.
73
74