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

Uploaded Source

Built Distributions

pikepdf-0.10.1-cp37-cp37m-win_amd64.whl (904.9 kB view details)

Uploaded CPython 3.7m Windows x86-64

pikepdf-0.10.1-cp37-cp37m-win32.whl (772.1 kB view details)

Uploaded CPython 3.7m Windows x86

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

Uploaded CPython 3.7m

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

Uploaded CPython 3.7m macOS 10.6+ intel

pikepdf-0.10.1-cp36-cp36m-win_amd64.whl (904.9 kB view details)

Uploaded CPython 3.6m Windows x86-64

pikepdf-0.10.1-cp36-cp36m-win32.whl (772.0 kB view details)

Uploaded CPython 3.6m Windows x86

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

Uploaded CPython 3.6m

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

Uploaded CPython 3.6m macOS 10.6+ intel

pikepdf-0.10.1-cp35-cp35m-win_amd64.whl (904.9 kB view details)

Uploaded CPython 3.5m Windows x86-64

pikepdf-0.10.1-cp35-cp35m-win32.whl (772.0 kB view details)

Uploaded CPython 3.5m Windows x86

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

Uploaded CPython 3.5m

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

File metadata

  • Download URL: pikepdf-0.10.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-0.10.1.tar.gz
Algorithm Hash digest
SHA256 29208e5c23a7543706e3574bedca89e909f5deefea8c007e97eb93c74b09e2ae
MD5 7d110e2d3f1ed9e525e13ab593888387
BLAKE2b-256 0f6f0c2bccad6ada2dc255cc112891ffac30c79e405143f315c30ba65f9beca6

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pikepdf-0.10.1-cp37-cp37m-win_amd64.whl
  • Upload date:
  • Size: 904.9 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.1-cp37-cp37m-win_amd64.whl
Algorithm Hash digest
SHA256 05c7698f0fa74c1ba3923f3a3b74dd12054b7f696d8e5018d2b0dccc356b6c04
MD5 655885ac044388fb67f4e2fcc0505e39
BLAKE2b-256 d3c8c446b35f4afc037fdf3b025b2234ac7bdffffdcf832cc06e2234982f2528

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pikepdf-0.10.1-cp37-cp37m-win32.whl
  • Upload date:
  • Size: 772.1 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.1-cp37-cp37m-win32.whl
Algorithm Hash digest
SHA256 52c8c0ef192bea43e119cc05a10f6ed86e53b3d6002896e816a1773cd8d4295d
MD5 66eecfb3ca9849dcc2968e74282f06ae
BLAKE2b-256 b8bf0b055003c2d3604583a1cd7798e7a0b382d2538086c06cfed19e712f8d7e

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pikepdf-0.10.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-0.10.1-cp37-cp37m-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 dcaebd6cd363afe7fa1dca665b1aa22a2e94837890c36652b6af11df4a665cb1
MD5 1bdd4d1f95031ea459db3c80d57b6bec
BLAKE2b-256 c01724285271fb607e70e24b4755a062164ef0ce49d44276efef688eacf21766

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pikepdf-0.10.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-0.10.1-cp37-cp37m-macosx_10_6_intel.whl
Algorithm Hash digest
SHA256 b438090aee73b8902dbb520294357f0fe52d5d761fb202f49c4d21f2d350b305
MD5 142a43ada1191138adf70065ffa7be2d
BLAKE2b-256 712ece67ee9770130f0ff88fe1a519d68cdca5fda8bade14715f4be7f1d73810

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pikepdf-0.10.1-cp36-cp36m-win_amd64.whl
  • Upload date:
  • Size: 904.9 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.1-cp36-cp36m-win_amd64.whl
Algorithm Hash digest
SHA256 418173f8a1c8c5d7512b9a6acfafaf8c7db650e5ec7fde834e17d5fbe54b3b26
MD5 61e96b3385dad5f566a8d0e90e444cc9
BLAKE2b-256 02699734d15bf6c06351b0eedf3bdd0e1bd2dbf4309afe2c9c20b50c35a7f410

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pikepdf-0.10.1-cp36-cp36m-win32.whl
  • Upload date:
  • Size: 772.0 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.1-cp36-cp36m-win32.whl
Algorithm Hash digest
SHA256 89dd07a2bae73b2083ee052c96af860e5832572fdba463f1e56f828e8adfb37a
MD5 0ce316234f02e6573715d4ae7cf7b70c
BLAKE2b-256 cc62fcc682baf741358488a4ddbed1449a8d105f58ac6b4e021d9fa71ca916d7

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pikepdf-0.10.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-0.10.1-cp36-cp36m-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 25756ff47f836f4154804b8f6b9bf09c73c70e77ca852b9c2a7822a81bc661b6
MD5 a7c3db803e164fbbfa8b814858a4572e
BLAKE2b-256 5d5dad5cacae14b2cc87c6e1fd5cea2fed696a9316d30299d47291f2bbd0e9d9

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pikepdf-0.10.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-0.10.1-cp36-cp36m-macosx_10_6_intel.whl
Algorithm Hash digest
SHA256 35dd135decdbd8e60a8f6ddb924b203d7ed005b076d5a83ae25f54d8d2fd92ec
MD5 f76ba66df57f6e1ee54c1b2d1a255bd5
BLAKE2b-256 7754dcce288ffc98cf70f3ab6bf94a755241812564805a7804e67c9f84b9115d

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pikepdf-0.10.1-cp35-cp35m-win_amd64.whl
  • Upload date:
  • Size: 904.9 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.1-cp35-cp35m-win_amd64.whl
Algorithm Hash digest
SHA256 10cacba801a49f99b502e665829045cb1fabf2382b6d3577499f52e7bec33bf3
MD5 01a992124a52270e9cfe3347fd5b1516
BLAKE2b-256 34069619332e8b54b1feea4a5cb50e8ed4f22d5dbbf4af8fb258abc2435f39bd

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pikepdf-0.10.1-cp35-cp35m-win32.whl
  • Upload date:
  • Size: 772.0 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.1-cp35-cp35m-win32.whl
Algorithm Hash digest
SHA256 40c3ed64ae89b8d365629b4a8f239e9c6bc84d31fdc97bdb1c99085118d794e9
MD5 a0255f7dc88d21027037bda8fa35ee54
BLAKE2b-256 6dd0353d45165fd3087a45954595a81e30e041deeef977651c75168ffb9a65cc

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pikepdf-0.10.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-0.10.1-cp35-cp35m-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 a0662ffcc6c71ba4938e201c57aa10edcd2d72d880a48c85e4d834d0e37927d2
MD5 7a853616c3f07fd63dbc41c022880609
BLAKE2b-256 45990fced5f31889b4c7702d21a2c453b05631d0bebafc7ecb6cc689afb2cadd

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pikepdf-0.10.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-0.10.1-cp35-cp35m-macosx_10_6_intel.whl
Algorithm Hash digest
SHA256 0127639ebf6023830b6e78ff1e79c3191122323c1ec772a0281d5f31154cd3b6
MD5 fec257b7b544ce8982942173cbf9c7d9
BLAKE2b-256 100e993630b2646825076a9fd87ae4985ff5a6d6f57d55da50e96bd2a87db1d2

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