Skip to main content

Read and write PDFs with Python, powered by qpdf

Project description

pikepdf

pikepdf is a Python library for reading and writing PDF files.

Travis CI build status (Linux and macOS) AppVeyor CI build status (Windows) PyPI

pikepdf is based on QPDF, a powerful PDF manipulation and repair library.

Python + QPDF = "py" + "qpdf" = "pyqpdf", which looks like a dyslexia test. Say it out loud, and it sounds like "pikepdf".

# Elegant, Pythonic API
pdf = pikepdf.open('input.pdf')
num_pages = len(pdf.pages)
del pdf.pages[-1]
pdf.save('output.pdf')

To install:

Python 3.5, 3.6 and 3.7 are fully supported.

pip install pikepdf

For users who want to build from source, see installation.

pikepdf is documented and actively maintained. Commercial support is available.

Features

This library is similar to PyPDF2 and pdfrw - it provides low level access to PDF features and allows editing and content transformation of existing PDFs. Some knowledge of the PDF specification may be helpful. It does not have the capability to render a PDF to image.

Python 2.7 and earlier versions of Python 3 are not currently supported but support is probably not difficult to achieve. Pull requests are welcome.

Feature pikepdf PyPDF2 pdfrw
Editing, manipulation and transformation of existing PDFs
Based on an existing, mature PDF library QPDF
Implementation C++ and Python Python Python
PDF versions supported 1.1 to 1.7 1.3? 1.7
Python versions supported 3.5-3.7 2.6-3.6 2.6-3.6
Supports password protected (encrypted) PDFs ✔ (except public key) Only obsolete RC4
Save and load PDF compressed object streams (PDF 1.5)
Creates linearized ("fast web view") PDFs
Actively maintained pikepdf commit activity PyPDF2 commit activity pdfrw commit activity
Test suite coverage ~86% very low unknown
Creates PDFs that pass PDF validation tests ?
Modifies PDF/A without breaking PDF/A compliance ?
Automatically repairs PDFs with internal errors
PDF XMP metadata editing read-only
Documentation
Integrates with Jupyter and IPython notebooks for rapid development

License

pikepdf is provided under the Mozilla Public License 2.0 license (MPL) that can be found in the LICENSE file. By using, distributing, or contributing to this project, you agree to the terms and conditions of this license.

Informally, MPL 2.0 is a not a "viral" license. It may be combined with other work, including commercial software. However, you must disclose your modifications to pikepdf in source code form. In other works, fork this repository on GitHub or elsewhere and commit your contributions there, and you've satisfied your obligations. MPL 2.0 is compatible with the GPL and LGPL - see the guidelines for notes on use in GPL.

The tests/resources/copyright file describes licensing terms for the test suite and the provenance of test resources.

Project details


Release history Release notifications | RSS feed

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pikepdf-0.10.2.tar.gz (1.4 MB view details)

Uploaded Source

Built Distributions

pikepdf-0.10.2-cp37-cp37m-win_amd64.whl (905.3 kB view details)

Uploaded CPython 3.7m Windows x86-64

pikepdf-0.10.2-cp37-cp37m-win32.whl (772.4 kB view details)

Uploaded CPython 3.7m Windows x86

pikepdf-0.10.2-cp37-cp37m-manylinux1_x86_64.whl (7.7 MB view details)

Uploaded CPython 3.7m

pikepdf-0.10.2-cp37-cp37m-macosx_10_6_intel.whl (1.1 MB view details)

Uploaded CPython 3.7m macOS 10.6+ intel

pikepdf-0.10.2-cp36-cp36m-win_amd64.whl (905.1 kB view details)

Uploaded CPython 3.6m Windows x86-64

pikepdf-0.10.2-cp36-cp36m-win32.whl (772.3 kB view details)

Uploaded CPython 3.6m Windows x86

pikepdf-0.10.2-cp36-cp36m-manylinux1_x86_64.whl (7.7 MB view details)

Uploaded CPython 3.6m

pikepdf-0.10.2-cp36-cp36m-macosx_10_6_intel.whl (1.1 MB view details)

Uploaded CPython 3.6m macOS 10.6+ intel

pikepdf-0.10.2-cp35-cp35m-win_amd64.whl (905.1 kB view details)

Uploaded CPython 3.5m Windows x86-64

pikepdf-0.10.2-cp35-cp35m-win32.whl (772.3 kB view details)

Uploaded CPython 3.5m Windows x86

pikepdf-0.10.2-cp35-cp35m-manylinux1_x86_64.whl (7.7 MB view details)

Uploaded CPython 3.5m

pikepdf-0.10.2-cp35-cp35m-macosx_10_6_intel.whl (1.1 MB view details)

Uploaded CPython 3.5m macOS 10.6+ intel

File details

Details for the file pikepdf-0.10.2.tar.gz.

File metadata

  • Download URL: pikepdf-0.10.2.tar.gz
  • Upload date:
  • Size: 1.4 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.21.0 setuptools/40.6.3 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.7.0

File hashes

Hashes for pikepdf-0.10.2.tar.gz
Algorithm Hash digest
SHA256 b398854f0e7640cc789d3294fe1b6c04266654fec2849c41d39025d6ca278d2d
MD5 01443229b14e038bde0c45dc261223c3
BLAKE2b-256 2f6ddfad9abf6020cb6e7e19f3ed50ae9682bf5daadf123da6d7ba227a59d045

See more details on using hashes here.

File details

Details for the file pikepdf-0.10.2-cp37-cp37m-win_amd64.whl.

File metadata

  • Download URL: pikepdf-0.10.2-cp37-cp37m-win_amd64.whl
  • Upload date:
  • Size: 905.3 kB
  • Tags: CPython 3.7m, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.21.0 setuptools/40.6.3 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.7.0

File hashes

Hashes for pikepdf-0.10.2-cp37-cp37m-win_amd64.whl
Algorithm Hash digest
SHA256 8c661177f4dd1dce7ba0a846998062cd70b361fca42906ca414a90b033851c88
MD5 6708473a5112d7bb4cf1bec419d268d6
BLAKE2b-256 e52c072b7c6cdf2204ac44cd33946ec561fa7d0b4eedbdc033c180daef9013dc

See more details on using hashes here.

File details

Details for the file pikepdf-0.10.2-cp37-cp37m-win32.whl.

File metadata

  • Download URL: pikepdf-0.10.2-cp37-cp37m-win32.whl
  • Upload date:
  • Size: 772.4 kB
  • Tags: CPython 3.7m, Windows x86
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.21.0 setuptools/40.6.3 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.7.0

File hashes

Hashes for pikepdf-0.10.2-cp37-cp37m-win32.whl
Algorithm Hash digest
SHA256 2d3a4f3c2810ba272b09b1445a616beb4858cdf2eaf0a23f88eaa96b2ffbb817
MD5 7b59a82643ef0a84b4d7b3c014963d49
BLAKE2b-256 7e859cda301c51ef89737f1668fe7ade195713ed14ece130442448610d754868

See more details on using hashes here.

File details

Details for the file pikepdf-0.10.2-cp37-cp37m-manylinux1_x86_64.whl.

File metadata

  • Download URL: pikepdf-0.10.2-cp37-cp37m-manylinux1_x86_64.whl
  • Upload date:
  • Size: 7.7 MB
  • Tags: CPython 3.7m
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.21.0 setuptools/38.2.4 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.6.3

File hashes

Hashes for pikepdf-0.10.2-cp37-cp37m-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 30d5c8bfd8f56a130b9d6a1293babede5b457b439cad7d5460060016e174ae07
MD5 2438767d0061d40d907aed7c256a4c12
BLAKE2b-256 1559f7dd91f71dbcbbe3cfb1e068d8d1ada26a938f702ceabb29c5d0d622d77c

See more details on using hashes here.

File details

Details for the file pikepdf-0.10.2-cp37-cp37m-macosx_10_6_intel.whl.

File metadata

  • Download URL: pikepdf-0.10.2-cp37-cp37m-macosx_10_6_intel.whl
  • Upload date:
  • Size: 1.1 MB
  • Tags: CPython 3.7m, macOS 10.6+ intel
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.21.0 setuptools/40.6.3 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.7.0

File hashes

Hashes for pikepdf-0.10.2-cp37-cp37m-macosx_10_6_intel.whl
Algorithm Hash digest
SHA256 ec9a0cda7c3c22e880980268ac2ace7049df3af5b1e755a460e073abdba52967
MD5 f264382c0cc1c5557b00636269674213
BLAKE2b-256 2dfd22bcaedc324d844bf8d0699600e5b445a737ea38ac715ab08cbb14bce882

See more details on using hashes here.

File details

Details for the file pikepdf-0.10.2-cp36-cp36m-win_amd64.whl.

File metadata

  • Download URL: pikepdf-0.10.2-cp36-cp36m-win_amd64.whl
  • Upload date:
  • Size: 905.1 kB
  • Tags: CPython 3.6m, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.21.0 setuptools/40.6.3 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.6.6

File hashes

Hashes for pikepdf-0.10.2-cp36-cp36m-win_amd64.whl
Algorithm Hash digest
SHA256 088b296b583cfdbb8066cb572b2491c9d8ee77b3adb9b590ea6199841313ab3c
MD5 c6460200f32489c39f79ee93677036dc
BLAKE2b-256 0e1ee20543e606bd82193f4a13b978b75f4937a43d1cf7bf8beabb46a4d39139

See more details on using hashes here.

File details

Details for the file pikepdf-0.10.2-cp36-cp36m-win32.whl.

File metadata

  • Download URL: pikepdf-0.10.2-cp36-cp36m-win32.whl
  • Upload date:
  • Size: 772.3 kB
  • Tags: CPython 3.6m, Windows x86
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.21.0 setuptools/40.6.3 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.6.6

File hashes

Hashes for pikepdf-0.10.2-cp36-cp36m-win32.whl
Algorithm Hash digest
SHA256 d36420068f81575712020407fee921ddb82572706b910233f2b7173e6f115602
MD5 9b6a01d90c0f02f50e894d7cdd8a94a8
BLAKE2b-256 4feba4aace8d4d1edf4fd51403a695ea65457f13eeea2515209f0513a2d1ca99

See more details on using hashes here.

File details

Details for the file pikepdf-0.10.2-cp36-cp36m-manylinux1_x86_64.whl.

File metadata

  • Download URL: pikepdf-0.10.2-cp36-cp36m-manylinux1_x86_64.whl
  • Upload date:
  • Size: 7.7 MB
  • Tags: CPython 3.6m
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.21.0 setuptools/38.2.4 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.6.3

File hashes

Hashes for pikepdf-0.10.2-cp36-cp36m-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 6ac74ad1f239fd3361edc0e7a3b59fc58ad8eb2e239f497779b93d111d499035
MD5 d5912f971b316fefd01035a854de13ea
BLAKE2b-256 da9057de94f1c76766f1719662bfafb7e9e4375bce6d49226aeb6a48094480f0

See more details on using hashes here.

File details

Details for the file pikepdf-0.10.2-cp36-cp36m-macosx_10_6_intel.whl.

File metadata

  • Download URL: pikepdf-0.10.2-cp36-cp36m-macosx_10_6_intel.whl
  • Upload date:
  • Size: 1.1 MB
  • Tags: CPython 3.6m, macOS 10.6+ intel
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.21.0 setuptools/40.6.3 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.7.0

File hashes

Hashes for pikepdf-0.10.2-cp36-cp36m-macosx_10_6_intel.whl
Algorithm Hash digest
SHA256 a3caddad8ae7707c0f4f5c0187787d9f06a85e7d10421fc7e2052ea16c4cb214
MD5 c982492a2bb04d444ab2522549e2a547
BLAKE2b-256 780797a3e5588eac3e155ed2833e9a646243ddac4ff0dc2f2bf268c031f77d58

See more details on using hashes here.

File details

Details for the file pikepdf-0.10.2-cp35-cp35m-win_amd64.whl.

File metadata

  • Download URL: pikepdf-0.10.2-cp35-cp35m-win_amd64.whl
  • Upload date:
  • Size: 905.1 kB
  • Tags: CPython 3.5m, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.21.0 setuptools/40.6.3 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.5.4

File hashes

Hashes for pikepdf-0.10.2-cp35-cp35m-win_amd64.whl
Algorithm Hash digest
SHA256 7637856cfee83cda6be4f1224cbdaf547c5a058fda0e131db3622f50ca511d96
MD5 a112a647dc4f16cc8d72013bffe04a64
BLAKE2b-256 0fdbc884f824d69ee32a0d24657d446c00a02cb293d7f88456419137232fe5fd

See more details on using hashes here.

File details

Details for the file pikepdf-0.10.2-cp35-cp35m-win32.whl.

File metadata

  • Download URL: pikepdf-0.10.2-cp35-cp35m-win32.whl
  • Upload date:
  • Size: 772.3 kB
  • Tags: CPython 3.5m, Windows x86
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.21.0 setuptools/40.6.3 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.5.4

File hashes

Hashes for pikepdf-0.10.2-cp35-cp35m-win32.whl
Algorithm Hash digest
SHA256 53546cf80eaaa15639284372920f3c587207bb34d48f7a93d11f4b1c5b033eb6
MD5 334288abf412fb272d6b1f45227dc386
BLAKE2b-256 10d919e8861de3ce11d3d1732344658b372472238375a6bc6754e8c6f139d9aa

See more details on using hashes here.

File details

Details for the file pikepdf-0.10.2-cp35-cp35m-manylinux1_x86_64.whl.

File metadata

  • Download URL: pikepdf-0.10.2-cp35-cp35m-manylinux1_x86_64.whl
  • Upload date:
  • Size: 7.7 MB
  • Tags: CPython 3.5m
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.21.0 setuptools/38.2.4 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.6.3

File hashes

Hashes for pikepdf-0.10.2-cp35-cp35m-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 44bfdcfe2e706efb43ecf181840f17efc5afff45daa7e8da72b3ae03b52c83ca
MD5 6a07147e44d671077b41d1d357ad8632
BLAKE2b-256 2cbf1da8cc9b70f75fbc70f77d87489f99932ac7aa57b49f1f08bd11084ba855

See more details on using hashes here.

File details

Details for the file pikepdf-0.10.2-cp35-cp35m-macosx_10_6_intel.whl.

File metadata

  • Download URL: pikepdf-0.10.2-cp35-cp35m-macosx_10_6_intel.whl
  • Upload date:
  • Size: 1.1 MB
  • Tags: CPython 3.5m, macOS 10.6+ intel
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.21.0 setuptools/40.6.3 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.7.0

File hashes

Hashes for pikepdf-0.10.2-cp35-cp35m-macosx_10_6_intel.whl
Algorithm Hash digest
SHA256 702809285081067ffb0e1a44e190354bb8526d642dbe39d68f2506d9bb3e5d01
MD5 5601c9e4df49add97891701bb8e70b44
BLAKE2b-256 76499de76f8de4dcad3672f94e385cbda1e551e6970c4ce6107383a544045fc0

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page