NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
PyPI, #187 most downloaded on PyPI
A pure-python PDF library capable of splitting, merging, cropping, and transforming PDF files
Latest stable
7.1.1
Last release 4 days ago
18 Nov 2026
Ships fairly regularly
a new release about every 2 weeks
Nearly every release is documented
notes for 56 of the last 60 stable releases
Nothing withdrawn
no release was ever pulled
13 years old
131 releases · first in 2014
Drag across the ruler to compare, or tap a release to open it.
Limit inline image size for known-size fallback path ( #4460 ) by @stefan6419846
Your coding agent can read these notes before it upgrades. Set up the MCP server →
Deprecate passing a boolean to remove_images (#4412) by @MartinThoma
Determine image buffer sizes using the actual bytes per pixel ( #4374 ) by @Master-Norna
Cleanup deprecations for the next major release ( #4306 ) by @stefan6419846
Limit the number of copied page attributes during flattening ( #4290 ) by @stefan6419846
Use the validated page count after decrypting a document ( #4270 ) by @stefan6419846
Avoid repeated full file loads ( #4240 ) by @stefan6419846
Only open /DCTDecode image data with the Pillow JPEG plugin ( #4222 ) by @metsw24-max
Improve performance and limit field work ( #4219 ) by @stefan6419846
Prevent cyclic tree handling ( #4188 ) by @stefan6419846
Limit work per stream (filter count, accumulated decoding work) ( #4173 ) by @stefan6419846
Limit size of alphabetical page labels ( #4096 ) by @stefan6419846
Further restrict FlateDecode recovery ( #4073 ) by @stefan6419846
/Widths (#4072) by @stefan6419846/Widths (#4072)Please note that this release requires users which previously overwrote the default limits to migrate to the new approach: Docs
Please note that this release requires users which previously overwrote the default limits to migrate to the new approach: Docs
In short:
apply_configuration as a context manager to temporarily overwrite configuration values.overwrite_configuration to change the configuration values for the whole session.The old overwrites should continue to work in most cases. If you have migrated successfully and do not need the legacy handling anymore (which can cause some overhead), consider using the temporary disable_legacy_handling setting:
from pypdf import overwrite_configuration
overwrite_configuration(disable_legacy_handling=True)In case you are experiencing some unexpected issues after the migration, consider opening a new issue (or commenting on an existing one) with the necessary details to reproduce it.
Limit value for Roman numerals ( #4047 ) by @stefan6419846
Make remove_from_tree() work on outline items ( #3939 ) by @RISHIKKASULA
Limit iterations for outline retrieval and XForm text extraction ( #3966 ) by @stefan6419846
Detect cycles in TreeObject.insert_child ( #3964 ) by @stefan6419846
Deprecate previously missed inline_images setter as well ( #3897 ) by @stefan6419846
Avoid infinite loops for incomplete ASCII85 and ASCIIHex inline images ( #3892 ) by @stefan6419846
Detect end of stream during inline image end marker detection ( #3891 ) by @stefan6419846
Apply general limit for requested image size ( #3888 ) by @stefan6419846
Apply MAX_DECLARED_STREAM_LENGTH to streams without length as well ( #3871 ) by @stefan6419846
Detect multi-hop cyclic /Pages trees in _flatten to prevent SIGSEGV ( #3847 ) by @fredericoschardong
Prevent infinite loops when processing threads/articles ( #3839 ) by @stefan6419846
Type the always-raising deprecation helpers as NoReturn (#3819) by @estelledc
NoReturn (#3819) by @estelledcNoReturn (#3819)Optimize _decode_png_prediction regarding memory and speed (#3806) by @stefan6419846
Limit input size and element count for XMP metadata (#3796) by @stefan6419846
Disallow cross-reference streams with zero-only width values (#3791) by @stefan6419846
Initialise a Font from an embedded font file (#3704) by @PJBrs
Do not rely on possibly invalid /Size for incremental cloning (#3735) by @stefan6419846
Limit the allowed size of xref and object streams (#3733) by @stefan6419846
Disallow custom XML entity declarations for XMP metadata (#3724) by @stefan6419846
Avoid infinite loop in read_from_stream for broken files (#3693) by @stefan6419846
Improve performance and limit length of array-based content streams (#3686) by @stefan6419846
Expose /Perms verification result on Encryption object (#3672) by @costajohnt
Limit allowed /Length value of stream (#3675) by @stefan6419846
/Length value of stream (#3675) by @stefan6419846PageObject.replace_contents on PdfReader (#3669) by @stefan6419846/Length value of stream (#3675)PageObject.replace_contents on PdfReader (#3669)Improve the performance of the ASCIIHexDecode filter (#3666) by @stefan6419846
Allow limiting output length for RunLengthDecode filter (#3664) by @stefan6419846
Use zlib decompression limit when retrieving XFA data (#3658) by @stefan6419846
Prevent infinite loop from circular xref /Prev references (#3655) by @rampageservices
/Pages (#3650) by @stefan6419846/Pages (#3650)Detect cyclic references when accessing TreeObject.children (#3645) by @stefan6419846
/ToUnicode entries (#3646) by @stefan6419846PageObject.replace_contents (#3638) by @stefan6419846/ToUnicode entries (#3646)PageObject.replace_contents (#3638)Deprecate support for abbreviations in decode_stream_data (#3617) by @stefan6419846
self._info being None in compress_identical_objects (#3612) by @stefan6419846self._info being None in compress_identical_objects (#3612)Detect cyclic references when retrieving outlines (#3610) by @stefan6419846
/AcroForm might be NullObject (#3601) by @joshkersey
/AcroForm might be NullObject (#3601) by @joshkersey/AcroForm might be NullObject (#3601)Improve handling of partially broken PDF files (#3594) by @stefan6419846
Limit jbig2dec memory usage (#3576) by @stefan6419846
Fix KeyError when flattening form field without /Font in resources (#3554) by @jgillard
Optimize loop for layout mode text extraction (#3543) by @FelipeErmeson
Reduce default limit for LZW decoding by @stefan6419846
Wrap and align text in flattened PDF forms (#3465) by @PJBrs
Add 'strict' parameter to PDFWriter (#3503) by @Arya-A-Nair
Allow limiting size of LZWDecode streams (#3502) by @stefan6419846
Fix handling of zero-length StreamObject (#3485) by @Likend
Insert new embedded files in a sorted manner (#3477) by @stefan6419846
Enhance XMP metadata handling with creation and setter methods (#3410) by @Arya-A-Nair
Cleanup deprecations (#3424) by @stefan6419846
Automatically preserve links in added pages (#3298) by @larsga
Implement flattening for writer (#3312) by @PJBrs
Performance optimization for LZW decoding (#3329) by @henningkoertelgmg
One column per quarter.