NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
PyPI
PyPI, #1024 most downloaded on PyPI
A pure-python PDF library capable of splitting, merging, cropping, and transforming PDF files
Latest stable
3.0.1
Last release 4 years ago
no release in 18 months
Ships fairly regularly
a new release about every 2 weeks
Most releases are documented
notes for 51 of the last 60 stable releases
Nothing withdrawn
no release was ever pulled
13 years old
66 releases · first in 2013
Drag across the ruler to compare, or tap a release to open it.
Nothing published for this version
Deprecate features with PyPDF2==3.0.0
Full Changelog: https://github.com/py-pdf/PyPDF2/compare/2.12.1...3.0.0
Your coding agent can read these notes before it upgrades. Set up the MCP server →
Deduplicate extract_text docstring
Consistency changes:
Full Changelog: https://github.com/py-pdf/PyPDF2/compare/2.12.0...2.12.1
Consistency changes:
Add support to extract gray scale images (#1460) by @joeywang4
Full Changelog: https://github.com/py-pdf/PyPDF2/compare/2.11.2...2.12.0
Add remove_from_tree (#1432) by @pubpub-zz
Full Changelog: https://github.com/py-pdf/PyPDF2/compare/2.11.1...2.11.2
Cope with cmap from #1322 (#1372) by @pubpub-zz
Full Changelog: https://github.com/py-pdf/PyPDF2/compare/2.11.0...2.11.1
Addition of optional visitor-functions in extract_text() (#1252) by @srogmann
Full Changelog: https://github.com/py-pdf/PyPDF2/compare/2.10.9...2.11.0
Add rotation property and transfer_rotate_to_content (#1348) by @pubpub-zz
Full Changelog: https://github.com/py-pdf/PyPDF2/compare/2.10.8...2.10.9
ROB: Improve NameObject reading/writing by @pubpub-zz in https://github.com/py-pdf/PyPDF2/pull/1345
Full Changelog: https://github.com/py-pdf/PyPDF2/compare/2.10.7...2.10.8
Fix Error in transformations (#1341) by @pubpub-zz
Full Changelog: https://github.com/py-pdf/PyPDF2/compare/2.10.6...2.10.7
Two robustness issues were fixed by @pubpub-zz - thank you :pray: The infinite loop issue might also be a security concern, depending on how you use P
Two robustness issues were fixed by @pubpub-zz - thank you :pray: The infinite loop issue might also be a security concern, depending on how you use PyPDF2.
Robustness (ROB):
Full Changelog: https://github.com/py-pdf/PyPDF2/compare/2.10.5...2.10.6
Auto-detect RTL for text extraction (#1309) by @pubpub-zz
Full Changelog: https://github.com/py-pdf/PyPDF2/compare/2.10.4...2.10.5
Fix errors/warnings on no /Resources within extract_text (#1276) by @pubpub-zz
Full Changelog: https://github.com/py-pdf/PyPDF2/compare/2.10.3...2.10.4
Various PdfWriter (Layout, Bookmark deprecation)
Full Changelog: https://github.com/py-pdf/PyPDF2/compare/2.10.2...2.10.3
Full Changelog: https://github.com/py-pdf/PyPDF2/compare/2.10.1...2.10.2
Full Changelog: https://github.com/py-pdf/PyPDF2/compare/2.10.1...2.10.2
Don't check coverage for deprecated code
Full Changelog: https://github.com/py-pdf/PyPDF2/compare/2.10.0...2.10.1
"with" support for PdfMerger and PdfWriter (#1193) by @JianzhengLuo
Full Changelog: https://github.com/py-pdf/PyPDF2/compare/2.9.0...2.10.0
Full Changelog: https://github.com/py-pdf/PyPDF2/compare/2.9.0...2.10.0
Add ability to add hex encoded colors to outline items (#1186) by @mtd91429
Full Changelog: https://github.com/py-pdf/PyPDF2/compare/2.8.1...2.9.0
Typo in merger deprecation warning message (#1166) by @pubpub-zz
Full Changelog: https://github.com/py-pdf/PyPDF2/compare/2.8.0...2.8.1
Thank you @pubpub-zz and @exiledkingcc for your contributions :heart:
Thank you @pubpub-zz and @exiledkingcc for your contributions :heart:
Full Changelog: https://github.com/py-pdf/PyPDF2/compare/2.7.0...2.8.0
Add deprecated EncodedStreamObject functions back until PyPDF2==3.0.0
outline_count property (#1129)Full Changelog: https://github.com/py-pdf/PyPDF2/compare/2.6.0...2.7.0
Add color and font_format to PdfReader.outlines[i]
build_destination for named destination outlines (#1128)Full Changelog: https://github.com/py-pdf/PyPDF2/compare/2.5.0...2.6.0
Add support for indexed color spaces / BitsPerComponent for decoding PNGs
Full Changelog: https://github.com/py-pdf/PyPDF2/compare/2.4.2...2.5.0
Wrong page inserted when PdfMerger.merge is done
Full Changelog: https://github.com/py-pdf/PyPDF2/compare/2.4.1...2.4.2
Add writer.pdf_header property (getter and setter)
Full Changelog: https://github.com/py-pdf/PyPDF2/compare/2.4.0...2.4.1
Thanks to @exiledkingcc PyPDF2 now also supports R6 decryption 🎉 Thank you 🤗
Thanks to @exiledkingcc PyPDF2 now also supports R6 decryption 🎉 Thank you 🤗
Full Changelog: https://github.com/py-pdf/PyPDF2/compare/2.3.1...2.4.0
Forgot to add the interal _codecs subpackage.
_codecs subpackage.Full Changelog: https://github.com/py-pdf/PyPDF2/compare/2.3.0...2.3.1
The highlight of this release is improved support for file encryption (AES-128 and AES-256, R5 only). See #749 for the amazing work of @exiledkingcc 🎊
The highlight of this release is improved support for file encryption (AES-128 and AES-256, R5 only). See #749 for the amazing work of @exiledkingcc 🎊 Thank you 🤗
PdfWriter.get_page: the pageNumber parameter is renamed to page_numberPyPDF2.filters:
PyPDF2.xmp:
PyPDF2.generic:
Full Changelog: https://github.com/py-pdf/PyPDF2/compare/2.2.1...2.3.0
Apply improvements to _utils suggested by perflint
Full Changelog: https://github.com/py-pdf/PyPDF2/compare/2.2.0...2.2.1
The 2.2.0 release improves text extraction (#969 - again by @pubpub-zz 🙏):
The 2.2.0 release improves text extraction (#969 - again by @pubpub-zz 🙏):
Those changes should mainly improve the text extraction for non-ASCII alphabets, e.g. Russian / Chinese / Japanese / Korean / Arabic.
Full Changelog: https://github.com/py-pdf/PyPDF2/compare/2.1.1...2.2.0
Mark read_next_end_line as deprecated
PageObject in PyPDF2 root (#960)Full Changelog: https://github.com/py-pdf/PyPDF2/compare/2.1.0...2.1.1
Mark deprecated code with no-cover
The highlight of the 2.1.0 release is the most massive improvement to the text extraction capabilities of PyPDF2 since 2016 🥳🎊 A very big thank you goes to pubpub-zz who took a lot of time and knowledge about the PDF format to finally get those improvements into PyPDF2. Thank you 🤗💚
In case the new function causes any issues, you can use _extract_text_old
for the old functionality. Please also open a bug ticket in that case.
There were several people who have attempted to bring similar improvements to PyPDF2. All of those were valuable. The main reason why they didn't get merged is the big amount of open PRs / issues. pubpub-zz was the most comprehensive PR which also incorporated the latest changes of PyPDF2 2.0.0.
Thank you to VictorCarlquist for #858 and asabramo for #464 🤗
Full Changelog: https://github.com/py-pdf/PyPDF2/compare/2.0.0...2.1.0
Full Changelog: https://github.com/py-pdf/PyPDF2/compare/2.0.0...2.1.0
We introduced a deprecation process that hopefully helps users to avoid unexpected breaking changes.
The 2.0.0 release of PyPDF2 includes three core changes:
We introduced a deprecation process that hopefully helps users to avoid unexpected breaking changes.
overwriteWarnings
parameter. The new behavior is overwriteWarnings=False.ConvertFunctionsToVirtualList was removedformatWarning was removedisInt(obj): Use instance(obj, int) insteadu_(s): Use s directlychr_(c): Use chr(c) insteadbarray(b): Use bytearray(b) insteadisBytes(b): Use instance(b, type(bytes())) insteadxrange_fn: Use range insteadstring_type: Use str insteadisString(s): Use instance(s, str) instead_basestring: Use str insteadPyPDF2.errors:
PyPDF2.pdf (the pdf module) no longer exists. The contents were moved with
the library. You should most likely import directly from PyPDF2 instead.
The RectangleObject is in PyPDF2.generic.Resources, Scripts, and Tests will no longer be part of the distribution
files on PyPI. This should have little to no impact on most people. The
Tests are renamed to tests, the Resources are renamed to resources.
Both are still in the git repository. The Scripts are now in
https://github.com/py-pdf/cpdf. Sample_Code was moved to the docs.For a full list of deprecated functions, please see the changelog of version 1.28.0.
Full Changelog: https://github.com/py-pdf/PyPDF2/compare/1.28.4...2.0.0
This is a bugfix for the old 1.x branch of PyPDF2 that still supports Python 2. Please try to update to the latest PyPDF2 > 2.0.0 version to get way b
This is a bugfix for the old 1.x branch of PyPDF2 that still supports Python 2. Please try to update to the latest PyPDF2 > 2.0.0 version to get way better text extraction, support for modern encryption, and much more.
Full Changelog: https://github.com/py-pdf/PyPDF2/compare/1.28.5...1.28.6
BUG: Add missing deprecated EncodedStreamObject functions by @MasterOdin in https://github.com/py-pdf/PyPDF2/pull/1140
Full Changelog: https://github.com/py-pdf/PyPDF2/compare/1.28.4...1.28.5
XmpInformation._converter_date was unusable
Bug Fixes (BUG):
Full Changelog: https://github.com/py-pdf/PyPDF2/compare/1.28.3...1.28.4
Full Changelog: https://github.com/py-pdf/PyPDF2/compare/1.28.3...1.28.4
Fix PendingDeprecationWarning on _merge_page
Full Changelog: https://github.com/py-pdf/PyPDF2/compare/1.28.2...1.28.3
PendingDeprecationWarning for getContents
Full Changelog: https://github.com/py-pdf/PyPDF2/compare/1.28.1...1.28.2
Incorrectly show deprecation warnings on internal usage
Full Changelog: https://github.com/py-pdf/PyPDF2/compare/1.28.0...1.28.1
This release adds a lot of deprecation warnings in preparation of the PyPDF2 2.0.0 release. The changes are mostly using snake_case function-, method-…
This release adds a lot of deprecation warnings in preparation of the PyPDF2 2.0.0 release. The changes are mostly using snake_case function-, method-, and variable-names as well as using properties instead of getter-methods.
Maintenance (MAINT):
Full Changelog: https://github.com/py-pdf/PyPDF2/compare/1.27.12...1.27.13
PyPDF2.utils module privateIn many places:
PyPDF2.generic
PdfReader class:
reader.getPage(pageNumber) ➔ reader.pages[page_number]reader.getNumPages() / reader.numPages ➔ len(reader.pages)PdfWriter class:
writer.getPage(pageNumber) ➔ writer.pages[page_number]writer.getNumPages() ➔ len(writer.pages)PdfMerger class
__init__ parameter: strict=True ➔ strict=False (the PdfFileMerger still has the old default)Page class:
XmpInformation class:
utils.py:
Full Changelog: https://github.com/py-pdf/PyPDF2/compare/1.27.12...1.28.0
_rebuild_xref_table expects trailer to be a dict
Full Changelog: https://github.com/py-pdf/PyPDF2/compare/1.27.11...1.27.12
Incorrectly issued xref warning/exception
Full Changelog: https://github.com/py-pdf/PyPDF2/compare/1.27.10...1.27.11
Handle missing destinations in reader
Full Changelog: https://github.com/py-pdf/PyPDF2/compare/1.27.9...1.27.10
A change I would like to highlight is the performance improvement for large PDF files (#808 by @dsk7) 🎉
A change I would like to highlight is the performance improvement for large PDF files (#808 by @dsk7) 🎉
Full Changelog: https://github.com/py-pdf/PyPDF2/compare/1.27.8...1.27.9
Use 1MB as offset for readNextEndLine
Full Changelog: https://github.com/py-pdf/PyPDF2/compare/1.27.7...1.27.8
Import exceptions from PyPDF2.errors in PyPDF2.utils
Full Changelog: https://github.com/py-pdf/PyPDF2/compare/1.27.6...1.27.7
Remove support for Python 2.6 and older
Full Changelog: https://github.com/py-pdf/PyPDF2/compare/1.27.5...1.27.6
ContentStream_readInlineImage had potential infinite loop
All changes: https://github.com/py-pdf/PyPDF2/compare/1.27.4...1.27.5
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Add alpha channel support for png files in Script
pre-commit install to avoid tiny issues
like trailing whitespacesYou can see the full changelog at: https://github.com/mstamy2/PyPDF2/compare/1.26.0...1.27.0
NOTE: Active maintenance on PyPDF2 is resuming after a hiatus
2016-05-18
Fix bug when parsing inline images. Occurred when merging certain pages with inline images
2015-07-20
isString() testAdded Python 3 algorithm for ASCII85Decode. Fixes issue when reading reportlab-generated files with Py 3. _jerickbixly_
2015-07-07
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
One column per quarter.