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

This version

1.0.1

Download files

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

Source Distribution

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

Uploaded Source

Built Distributions

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

Uploaded CPython 3.7m Windows x86-64

pikepdf-1.0.1-cp37-cp37m-win32.whl (772.5 kB view details)

Uploaded CPython 3.7m Windows x86

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

Uploaded CPython 3.7m

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

Uploaded CPython 3.7m macOS 10.6+ intel

pikepdf-1.0.1-cp36-cp36m-win_amd64.whl (905.2 kB view details)

Uploaded CPython 3.6m Windows x86-64

pikepdf-1.0.1-cp36-cp36m-win32.whl (772.4 kB view details)

Uploaded CPython 3.6m Windows x86

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

Uploaded CPython 3.6m

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

Uploaded CPython 3.6m macOS 10.6+ intel

pikepdf-1.0.1-cp35-cp35m-win_amd64.whl (905.2 kB view details)

Uploaded CPython 3.5m Windows x86-64

pikepdf-1.0.1-cp35-cp35m-win32.whl (772.4 kB view details)

Uploaded CPython 3.5m Windows x86

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

Uploaded CPython 3.5m

pikepdf-1.0.1-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-1.0.1.tar.gz.

File metadata

  • Download URL: pikepdf-1.0.1.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-1.0.1.tar.gz
Algorithm Hash digest
SHA256 05658584f2cfee844de7d754213a7379956ff4cc8b10c6c0d695abf2096b98da
MD5 09f16f1f9eac3cd0c7534ad2f531414d
BLAKE2b-256 1b4b1af6f98028cf6f96b3e03d0b7d7167e4510629525a50e76abb6f3e3a4333

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pikepdf-1.0.1-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-1.0.1-cp37-cp37m-win_amd64.whl
Algorithm Hash digest
SHA256 e935bec30f03133339bbed892494fa7f6d68080c02c2b0f930b4886e7c75c1a9
MD5 0eeb41438b50c18f3416974655971cef
BLAKE2b-256 259fd3008d57b3d5873ebe61fe93b89f06d8ea4bdcfe890d62f123f37f636e3e

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pikepdf-1.0.1-cp37-cp37m-win32.whl
  • Upload date:
  • Size: 772.5 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-1.0.1-cp37-cp37m-win32.whl
Algorithm Hash digest
SHA256 be673d51b19fa7461c1e6c6c58cb430147758d994e4382c165a7b286004b28eb
MD5 3ef5b7fd049408b71f5aa4d21d0251bb
BLAKE2b-256 570441686242da95cbcd2224d2d6ca6426650dff2cb014d11b970a1187ac57fb

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pikepdf-1.0.1-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-1.0.1-cp37-cp37m-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 d1840490fad9174b6276af353d610b5ef20e6c09904db8b1cc100a221e96e511
MD5 b5d556c8fe371a54171a491dc433cbac
BLAKE2b-256 7cf9e0ee524535c2472d159da6c814cbdf23be8e5b2199eacf4525441b6af402

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pikepdf-1.0.1-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-1.0.1-cp37-cp37m-macosx_10_6_intel.whl
Algorithm Hash digest
SHA256 cff33b9f0643577b395cdb0c7f0b767f803e94da5cd6c67e422d4ccc85294574
MD5 a876afa67a24db87bbe5b6cb1550c383
BLAKE2b-256 8eafd09f9b854e654dc301dae8d74c2eef277832bc7a97e4f57a0430bf095228

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pikepdf-1.0.1-cp36-cp36m-win_amd64.whl
  • Upload date:
  • Size: 905.2 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-1.0.1-cp36-cp36m-win_amd64.whl
Algorithm Hash digest
SHA256 dddabbb989700e26542fe1770f86653f8d3f09ff671a69f3eead744f61adf54a
MD5 474c54355995edd0e272b39ccc472747
BLAKE2b-256 2081b843c15a0cf133b4af591e8aea5609bd90404af64bfc5d49a8a84f202796

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pikepdf-1.0.1-cp36-cp36m-win32.whl
  • Upload date:
  • Size: 772.4 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-1.0.1-cp36-cp36m-win32.whl
Algorithm Hash digest
SHA256 2fb53e8572d48081dd7238f8e7a10a2800540afe8238abe89687beaff2c58d87
MD5 ad5137d96490ca363e8ca2d7a4a3ac33
BLAKE2b-256 0ab9256cee03b78fd4bac9c21aeca7254b383c6cca9656160655529a727147f2

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pikepdf-1.0.1-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-1.0.1-cp36-cp36m-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 eb0a7362c9589499bfd706930a1324fa591e959224aaaab7829e67212598b4b3
MD5 4c7eb8ad141f119e256b527b4ce05cc3
BLAKE2b-256 c755ae328230fd2d6bd24c89a8bc99a271b6bbced30eace850d55acd96328a60

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pikepdf-1.0.1-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-1.0.1-cp36-cp36m-macosx_10_6_intel.whl
Algorithm Hash digest
SHA256 c07bbc3bab0d142d8d48e6f45a538d9abfd10432754c4d192ee2b1427d18ba74
MD5 920478931242d0ff6627f793f0aec1c4
BLAKE2b-256 54460988c0159a93613e953edad8d67edce06844d81befeef1e1c6f33e3a6a40

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pikepdf-1.0.1-cp35-cp35m-win_amd64.whl
  • Upload date:
  • Size: 905.2 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-1.0.1-cp35-cp35m-win_amd64.whl
Algorithm Hash digest
SHA256 8c9f1517bf35955db8f5cc94504b734383ff0dcb2af162def3eeed071862976b
MD5 8441177fb88bb3bd5b65ceeacae0416c
BLAKE2b-256 9b369429cd6be76d235b25357fa3c0270ef9ae953dc010e06f673444763ebed7

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pikepdf-1.0.1-cp35-cp35m-win32.whl
  • Upload date:
  • Size: 772.4 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-1.0.1-cp35-cp35m-win32.whl
Algorithm Hash digest
SHA256 b3ead808091cd70e0cdf5eeff78f338f9d27e62739d5da530a7cf31ae9778adc
MD5 5d29929bd0476e67ce9cd9ea24393420
BLAKE2b-256 dba81cc29a56a359e04f6e534be3186181a4bc41f067af29a6b793f00a3f00e9

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pikepdf-1.0.1-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-1.0.1-cp35-cp35m-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 aa3d13101833fb8e1e947460404c30f0a32f94b14b22e888abe500abbb1001b5
MD5 731671a885af122844605b25f27bf058
BLAKE2b-256 f059d20206fbca9ff5422faab08c38b1f6aef6fb801d3c9318689f08243eeb31

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pikepdf-1.0.1-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-1.0.1-cp35-cp35m-macosx_10_6_intel.whl
Algorithm Hash digest
SHA256 b4d7ae5b0731bb6d6ca5877fe7ed17e5fcc5b80dee49257b6a6f5fa3d6ff6cfd
MD5 adf0ef209b7f504abcd79db898599a3f
BLAKE2b-256 527a7c8e41fbc2e892f129c7b2de8ad5a9442741c170f50c09c766a5da9402d1

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