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-1.0.5.tar.gz (1.4 MB view details)

Uploaded Source

Built Distributions

pikepdf-1.0.5-cp37-cp37m-win_amd64.whl (965.7 kB view details)

Uploaded CPython 3.7m Windows x86-64

pikepdf-1.0.5-cp37-cp37m-win32.whl (810.0 kB view details)

Uploaded CPython 3.7m Windows x86

pikepdf-1.0.5-cp37-cp37m-manylinux1_x86_64.whl (8.6 MB view details)

Uploaded CPython 3.7m

pikepdf-1.0.5-cp37-cp37m-macosx_10_6_intel.whl (1.2 MB view details)

Uploaded CPython 3.7m macOS 10.6+ intel

pikepdf-1.0.5-cp36-cp36m-win_amd64.whl (965.6 kB view details)

Uploaded CPython 3.6m Windows x86-64

pikepdf-1.0.5-cp36-cp36m-win32.whl (809.9 kB view details)

Uploaded CPython 3.6m Windows x86

pikepdf-1.0.5-cp36-cp36m-manylinux1_x86_64.whl (8.6 MB view details)

Uploaded CPython 3.6m

pikepdf-1.0.5-cp36-cp36m-macosx_10_6_intel.whl (1.2 MB view details)

Uploaded CPython 3.6m macOS 10.6+ intel

pikepdf-1.0.5-cp35-cp35m-win_amd64.whl (965.7 kB view details)

Uploaded CPython 3.5m Windows x86-64

pikepdf-1.0.5-cp35-cp35m-win32.whl (809.9 kB view details)

Uploaded CPython 3.5m Windows x86

pikepdf-1.0.5-cp35-cp35m-manylinux1_x86_64.whl (8.6 MB view details)

Uploaded CPython 3.5m

pikepdf-1.0.5-cp35-cp35m-macosx_10_6_intel.whl (1.2 MB view details)

Uploaded CPython 3.5m macOS 10.6+ intel

File details

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

File metadata

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

File hashes

Hashes for pikepdf-1.0.5.tar.gz
Algorithm Hash digest
SHA256 b878dda8618939b8dda61418f193904c720aaa606167906e33d6e21c5cb531e1
MD5 8e15eea99ee3af2bb0029356d47ff2d2
BLAKE2b-256 11ddb2740a6ebde6822e8bef1902b659e785b7a91630493ad217f1e76130b3c6

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for pikepdf-1.0.5-cp37-cp37m-win_amd64.whl
Algorithm Hash digest
SHA256 15af348556cc43e6e4d7df73e4c0dedce490d13ebd80f621abc355e415d72150
MD5 db3422729566ef8109b00ca56ee8147c
BLAKE2b-256 1563252879ad38652964cbf0310fd26450dd71af6dacb831f7e9b871892a610e

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for pikepdf-1.0.5-cp37-cp37m-win32.whl
Algorithm Hash digest
SHA256 dc6ebc03b964e017105b73c0b8815b47f248a8d90b42abda66d0351c808296ef
MD5 dd0f6031d2f8e6682c0301c6c3d8a8c3
BLAKE2b-256 4b30cbcb0845dbe7b2e5229c57c29a4d77b8584a042ec67d8ef966fadfeea503

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for pikepdf-1.0.5-cp37-cp37m-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 7cb7d54f0532c0b2d7a3d9d0f09701a9d9e690dc766daba88bcef8a820026b70
MD5 af259d207d33819a04a8cfe5c17ff9c2
BLAKE2b-256 04a68cb586ef5cba4b601d194d73eb8ec06941a240f37a265439aa05a8551f53

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for pikepdf-1.0.5-cp37-cp37m-macosx_10_6_intel.whl
Algorithm Hash digest
SHA256 1eb4351b9d0f0837208a1011cb23ce248b686d6d0fa1a2e33f2395e70777e005
MD5 eef07c557eaab29ee37d355660160ac4
BLAKE2b-256 981af45cec7bd02fa9414ad171d39c95610ea16a2d91a3bcdbabd8290d69832b

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for pikepdf-1.0.5-cp36-cp36m-win_amd64.whl
Algorithm Hash digest
SHA256 b78a7b3c7f20b6de9a8cb0fd13d3179fcc6a21a3da68d65ed4c692eee83ce08a
MD5 5d33a04110a7bbeacc468394d00ff819
BLAKE2b-256 4563ac197ed617ef1db227fea2d9d3ed145d6152c3eece5dfe7b1f020bad4f9b

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for pikepdf-1.0.5-cp36-cp36m-win32.whl
Algorithm Hash digest
SHA256 857c50537792c1341e75dfcfd6a6cf739df663aa3f6db09661de1aa24db63f77
MD5 e2d9a8417de894e7861b8f02327bf73f
BLAKE2b-256 3ad25d6437382920431e6d518af815cd569efa27088750ede7bb2d55dbf3b4a4

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for pikepdf-1.0.5-cp36-cp36m-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 f8debc59f7eb36a69e4d56572d5f4def053495ce5fb79335e9d7858d2b6819d5
MD5 a7126dcf77df213a24750f253ec59421
BLAKE2b-256 f96a15dff775ea94e7203e34f744f2537c06904e2b0d276da722cbdca48fefb6

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for pikepdf-1.0.5-cp36-cp36m-macosx_10_6_intel.whl
Algorithm Hash digest
SHA256 021be7303fe1da8a71efffb6479462688b093c54820ad6c4ca4f9790713d8e86
MD5 e2f83e73587518b5da8c245fccf58dc0
BLAKE2b-256 5633007178fa8c1fdec829a0fe60f15156f4e53cda95a5068b3c8964485770f8

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for pikepdf-1.0.5-cp35-cp35m-win_amd64.whl
Algorithm Hash digest
SHA256 dd66acad7540d5251e56744962267ba02b295f8b9ee48435164a18948224e45b
MD5 b5d82b0a18b110b1ac0c6a0e6ea8aff4
BLAKE2b-256 5df3ef544af1ad78ae127216c20eedbb5bcb084c6fa09415659fbfe603842221

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for pikepdf-1.0.5-cp35-cp35m-win32.whl
Algorithm Hash digest
SHA256 a0a87169006920ff532446ba24cd0a289f615fd5e474b860ed274ffa1e742c39
MD5 5e6e0783e967bc5643366785f052be5a
BLAKE2b-256 97a7d6fb3397716fa9c2ef4d250c1d5f4f0afbdcf4401de4d3819a0e875880e1

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for pikepdf-1.0.5-cp35-cp35m-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 cc51667d76ac312bae3d66ff494f0e6cba3b83b42d72aaf5461b2d0d53498fcb
MD5 ff8f2b135e8cdc15eb1d2a18800417fb
BLAKE2b-256 e3df31a36f0175f40c61fc87aaab797c19329bbff9533bb980d9539b9a2f7228

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for pikepdf-1.0.5-cp35-cp35m-macosx_10_6_intel.whl
Algorithm Hash digest
SHA256 805855e8263f8d7b9b4111789b5728f52a83fbb608350b5ac33286e672babc8d
MD5 d92976d7eda059ec2c847863973a9fb0
BLAKE2b-256 2e33902e45b8a3b187426ca47ab5edfbaa0e762e9519dd72bb4aefab31ebd346

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