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.4

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

Uploaded Source

Built Distributions

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

Uploaded CPython 3.7m Windows x86-64

pikepdf-1.0.4-cp37-cp37m-win32.whl (772.7 kB view details)

Uploaded CPython 3.7m Windows x86

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

Uploaded CPython 3.7m

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

Uploaded CPython 3.7m macOS 10.6+ intel

pikepdf-1.0.4-cp36-cp36m-win_amd64.whl (905.3 kB view details)

Uploaded CPython 3.6m Windows x86-64

pikepdf-1.0.4-cp36-cp36m-win32.whl (772.6 kB view details)

Uploaded CPython 3.6m Windows x86

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

Uploaded CPython 3.6m

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

Uploaded CPython 3.6m macOS 10.6+ intel

pikepdf-1.0.4-cp35-cp35m-win_amd64.whl (905.3 kB view details)

Uploaded CPython 3.5m Windows x86-64

pikepdf-1.0.4-cp35-cp35m-win32.whl (772.6 kB view details)

Uploaded CPython 3.5m Windows x86

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

Uploaded CPython 3.5m

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

File metadata

  • Download URL: pikepdf-1.0.4.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.0 CPython/3.7.0

File hashes

Hashes for pikepdf-1.0.4.tar.gz
Algorithm Hash digest
SHA256 f44435768c95faf7914d0476de8d14695fbf1780671acb53aa99de38c1f3db86
MD5 b819ff47c633b62d61753566f4d8d3f2
BLAKE2b-256 62dba80dcffeb3e38f723d4b88bb884baa67da54158b927ff8e3cfef46b5da30

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pikepdf-1.0.4-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.5.0.1 requests/2.21.0 setuptools/40.6.3 requests-toolbelt/0.8.0 tqdm/4.29.0 CPython/3.7.0

File hashes

Hashes for pikepdf-1.0.4-cp37-cp37m-win_amd64.whl
Algorithm Hash digest
SHA256 36475c5b0f1cebeb7c83bf547152892a53e241aded78395296206b2d8b0800ea
MD5 96c71bccd85c1e63e7d849d413d42468
BLAKE2b-256 56a5e31fcd3c537f8568f18cea7a36d1991125546ac618271e66fb3e9a80f391

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pikepdf-1.0.4-cp37-cp37m-win32.whl
  • Upload date:
  • Size: 772.7 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.0 CPython/3.7.0

File hashes

Hashes for pikepdf-1.0.4-cp37-cp37m-win32.whl
Algorithm Hash digest
SHA256 aa9afb3583e44be5e09aa8b29d7c4f6ab74003b8976cabc66c59e2b1978ee0d2
MD5 0220aa4d91dae6a8ee78cbbb72b4a33d
BLAKE2b-256 e7460063ed0c0d746eecf77f63ffbbc62c67907adfc24818fb8a61234fa52153

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pikepdf-1.0.4-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.5.0.1 requests/2.21.0 setuptools/38.2.4 requests-toolbelt/0.8.0 tqdm/4.29.0 CPython/3.6.3

File hashes

Hashes for pikepdf-1.0.4-cp37-cp37m-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 244cebfd6e148cfd7ce24836a1f8d0776c953285109c681aad82d5fdd1a7a1dc
MD5 6ee069ffb056d74c4a9b80dc61e35cd9
BLAKE2b-256 8d18f0c3789441e6206d375fc62a936c5939b6851e3e23ea9f6fe84c935005da

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pikepdf-1.0.4-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.5.0.1 requests/2.21.0 setuptools/40.6.3 requests-toolbelt/0.8.0 tqdm/4.29.0 CPython/3.7.0

File hashes

Hashes for pikepdf-1.0.4-cp37-cp37m-macosx_10_6_intel.whl
Algorithm Hash digest
SHA256 3b3f9a6094ef7ddc5a45e111d49102ef07e93ba8349cab8c99b1d982c47ad139
MD5 b6bc0d37484993d123eb19ec37578b6c
BLAKE2b-256 e2fefefac58953776af699e8d6766fd0c4fde1eaaabfb347361f7fa6f218b843

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pikepdf-1.0.4-cp36-cp36m-win_amd64.whl
  • Upload date:
  • Size: 905.3 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.0 CPython/3.6.6

File hashes

Hashes for pikepdf-1.0.4-cp36-cp36m-win_amd64.whl
Algorithm Hash digest
SHA256 f7097316b544da05212a5bd723c57137ecc52b3aac984f369104023a21578f0c
MD5 0f03d633947f87296e97fccabdbd3433
BLAKE2b-256 e6642d8242b4c03704586e60cc9fc202138a5a218a719338f0328cd625dc84b5

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pikepdf-1.0.4-cp36-cp36m-win32.whl
  • Upload date:
  • Size: 772.6 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.0 CPython/3.6.6

File hashes

Hashes for pikepdf-1.0.4-cp36-cp36m-win32.whl
Algorithm Hash digest
SHA256 6b032f7076134d6d90ff3725f70b9213f63d6099d040282c4ae00bdfdc8bf20b
MD5 64968786ad843657b7b4b2214c7d2893
BLAKE2b-256 751383c4841af8f9230f1308482343b41e4033335d16ada50911995487f3a466

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pikepdf-1.0.4-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.5.0.1 requests/2.21.0 setuptools/38.2.4 requests-toolbelt/0.8.0 tqdm/4.29.0 CPython/3.6.3

File hashes

Hashes for pikepdf-1.0.4-cp36-cp36m-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 f5d0a2665bcaa1124deb29044bdb2aa6f0c10bfa367153047cb9ac337a1a6456
MD5 ad23dea1592b3bec6f85d0ccc8d47317
BLAKE2b-256 fe1b965bdfb65445b062c61cfe798e492267a19a49ac9d80491ccea651424a12

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pikepdf-1.0.4-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.5.0.1 requests/2.21.0 setuptools/40.6.3 requests-toolbelt/0.8.0 tqdm/4.29.0 CPython/3.7.0

File hashes

Hashes for pikepdf-1.0.4-cp36-cp36m-macosx_10_6_intel.whl
Algorithm Hash digest
SHA256 0705b1d9070872aab1c907ae5c085fa44fdca346e263f8ddbb6e33049ec1b017
MD5 23597c54f76de3f5087340340705af24
BLAKE2b-256 f321c3aa293cf84330be892e9f0edb8534eda9f5aa2e3ed0c6fadeb6b57adb92

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pikepdf-1.0.4-cp35-cp35m-win_amd64.whl
  • Upload date:
  • Size: 905.3 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.0 CPython/3.5.4

File hashes

Hashes for pikepdf-1.0.4-cp35-cp35m-win_amd64.whl
Algorithm Hash digest
SHA256 fc438f1b6b15bb5b14fa54babe19b1abb06188259d85c3afce7589d4624c76ca
MD5 06c1aa62c197872d48e9cc2d77f13b01
BLAKE2b-256 0a7f2a6032d13527c7558baf8a60a42b97d2f3e999ac0be6b7ab38a3343b4398

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pikepdf-1.0.4-cp35-cp35m-win32.whl
  • Upload date:
  • Size: 772.6 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.0 CPython/3.5.4

File hashes

Hashes for pikepdf-1.0.4-cp35-cp35m-win32.whl
Algorithm Hash digest
SHA256 48399b41ab032a994d3a3276c9cbb45c7b9880b8f16a5e2db7906fc805d438fe
MD5 a6ab9370a745ae5676cd0086c616218d
BLAKE2b-256 c806dd6fbfbe7ead6952f16e6c2867fc13c2bd3da07aecd087d5397de6b61e03

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pikepdf-1.0.4-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.5.0.1 requests/2.21.0 setuptools/38.2.4 requests-toolbelt/0.8.0 tqdm/4.29.0 CPython/3.6.3

File hashes

Hashes for pikepdf-1.0.4-cp35-cp35m-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 e33971366c181673a5173c89f258f9b182d8078da4eaafcb9a1f47dde92fa55e
MD5 61e55b9fb4ecc37fbf2c03cf5d9d5d56
BLAKE2b-256 e6a28c7e137bc432dccd34cb1c0ebdb34961c22d5ba6a6084eb9f4ef6c684e5c

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pikepdf-1.0.4-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.5.0.1 requests/2.21.0 setuptools/40.6.3 requests-toolbelt/0.8.0 tqdm/4.29.0 CPython/3.7.0

File hashes

Hashes for pikepdf-1.0.4-cp35-cp35m-macosx_10_6_intel.whl
Algorithm Hash digest
SHA256 8c8d86ca23c13865ba0b71cf4b1b53ae1564a852e0bcba37bad7598ed698ef38
MD5 831eccfdfc12f9ebcec339824a4d8dff
BLAKE2b-256 b4963e0f69a90f14fd57817976b4512b6059768e59cba6911fb91ccf62de1e1d

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