NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
PyPI · #233 most downloaded on PyPI
A pure-python PDF library capable of splitting, merging, cropping, and transforming PDF files
Last release 18 days ago
16 Sep 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
12 years old
120 releases · first in 2014
Limit size of alphabetical page labels ( #4096 ) by @stefan6419846
One column per quarter.
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
NoReturn (#3819)Optimize _decode_png_prediction regarding memory and speed
Limit input size and element count for XMP metadata
Disallow cross-reference streams with zero-only width values
Initialise a Font from an embedded font file
Do not rely on possibly invalid /Size for incremental cloning
Limit the allowed size of xref and object streams
Disallow custom XML entity declarations for XMP metadata
Avoid infinite loop in read_from_stream for broken files
Improve performance and limit length of array-based content streams
Expose /Perms verification result on Encryption object
Limit allowed /Length value of stream
/Length value of stream (#3675)PageObject.replace_contents on PdfReader (#3669)Improve the performance of the ASCIIHexDecode filter
Allow limiting output length for RunLengthDecode filter
Use zlib decompression limit when retrieving XFA data
Prevent infinite loop from circular xref /Prev references
/Pages (#3650)Detect cyclic references when accessing TreeObject.children
/ToUnicode entries (#3646)PageObject.replace_contents (#3638)Deprecate support for abbreviations in decode_stream_data
self._info being None in compress_identical_objects (#3612)Detect cyclic references when retrieving outlines
Handle missing font bounding boxes gracefully
/AcroForm might be NullObject (#3601)Improve handling of partially broken PDF files
FontDescriptor: Initiate from embedded font resource
Fix KeyError when flattening form field without /Font in resources
Optimize loop for layout mode text extraction
Reduce default limit for LZW decoding
Wrap and align text in flattened PDF forms
Add 'strict' parameter to PDFWriter
Allow limiting size of LZWDecode streams
Fix handling of zero-length StreamObject
Insert new embedded files in a sorted manner
Enhance XMP metadata handling with creation and setter methods
Limit decompressed size for FlateDecode filter
Automatically preserve links in added pages
Implement flattening for writer
Performance optimization for LZW decoding
Deal with annotations not being lists on merge
Add basic support for JBIG2 by using jbig2dec
Add support for IndirectObject.__iter__
Add support for IndirectObject.__contains__
IndirectObject.__contains__ (#3155)Use the correct name StandardEncoding for the predefined cmap
EI sequences (#3152)Handle attachments in /Kids and provide object-oriented API
pytest.warns() (#3083)Deprecate with replacement CCITParameters
add_metadata can deal with _info = None (#3040)str.__new__ in TextStringObject (#2952)ContentStream.operations (#2941)Add layout_mode_font_height_weight argument to PageObject.extract_text()
layout_mode_font_height_weight argument to PageObject.extract_text() (#2920)Add full parameter to PdfWriter constructor
full parameter to PdfWriter constructor (#2865)Remove the deprecated PdfMerger and AnnotationBuilder classes and other deprecations cleanup
This version drops support for Python 3.7 (not maintained since July 2023), PdfMerger (use PdfWriter instead) and AnnotationBuilder (use annotations instead).
Add deprecate_with_replacement to StreamObject.initializeFromD…
Your coding agent can read these notes before it upgrades. Set up the MCP server →