-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Comparing changes
Open a pull request
base repository: py-pdf/pypdf
base: 6.8.0
head repository: py-pdf/pypdf
compare: 6.9.0
- 6 commits
- 16 files changed
- 4 contributors
Commits on Mar 10, 2026
-
BUG: Avoid accessing invalid page when inserting blank page under som…
…e conditions (#3529) width and height are now treated symmetrically, and updated only if they are not provided. --------- Co-authored-by: Stefan <96178532+stefan6419846@users.noreply.github.com>
Configuration menu - View commit details
-
Copy full SHA for 2cfcd7e - Browse repository at this point
Copy the full SHA 2cfcd7eView commit details
Commits on Mar 11, 2026
-
PI: Batch-parse all objects in ObjStm on first access (#3677)
On first access to any object in a compressed object stream, parse and cache ALL objects in that stream in one pass. This avoids O(N²) behavior when many objects from the same stream are resolved individually during add_page(). PDFs produced by DMS tools like PDFKit.NET DMV10 pack ~2000 objects into a single ObjStm. The previous code scanned the full header for each lookup, resulting in ~77M function calls and 5s+ parse times for a 370KB invoice. With batch parsing, the same file completes in ~0.08s (61x speedup).
Configuration menu - View commit details
-
Copy full SHA for cf2e518 - Browse repository at this point
Copy the full SHA cf2e518View commit details
Commits on Mar 12, 2026
-
PI: Fix O(n²) performance in NameObject read/write (#3679)
Three functions had quadratic behavior that caused hangs on PDFs with extremely long Name objects (e.g. repeatedly mis-encoded UTF-8 names): - read_until_regex: searched entire accumulated buffer on each 16-byte chunk instead of only the new chunk, and used bytes concatenation - NameObject.unnumber: rebuilt entire bytes object on each # replacement - NameObject.renumber: used out += concatenation in a loop
Configuration menu - View commit details
-
Copy full SHA for 3a4e913 - Browse repository at this point
Copy the full SHA 3a4e913View commit details -
ENH: Expose /Perms verification result on Encryption object (#3672)
Add `perms_valid` attribute to the `Encryption` class that stores the result of `AlgV5.verify_perms()`. This allows callers to detect when the `/Perms` integrity check fails for AES-256 encrypted documents (R5/R6), indicating that the `/P` permissions field may have been tampered with. Previously, a failed `/Perms` check only logged a warning with no programmatic way to detect it. Closes #3657.
Configuration menu - View commit details
-
Copy full SHA for a3451e8 - Browse repository at this point
Copy the full SHA a3451e8View commit details -
BUG: Avoid sharing array-based content streams between pages (#3681)
Otherwise, applying a transformation to one of the pages renders all pages referencing the shared objects invalid due to `PageObject.replace_contents` setting them to a `NullObject` without being able to reliable check for further usages. Closes #3680.
Configuration menu - View commit details
-
Copy full SHA for 5a9a0da - Browse repository at this point
Copy the full SHA 5a9a0daView commit details
Commits on Mar 15, 2026
-
## What's new ### New Features (ENH) - Expose /Perms verification result on Encryption object (#3672) by @costajohnt ### Performance Improvements (PI) - Fix O(n²) performance in NameObject read/write (#3679) by @dmitry-kostin - Batch-parse all objects in ObjStm on first access (#3677) by @dmitry-kostin ### Bug Fixes (BUG) - Avoid sharing array-based content streams between pages (#3681) by @stefan6419846 - Avoid accessing invalid page when inserting blank page under some conditions (#3529) by @j-t-1 [Full Changelog](6.8.0...6.9.0)
Configuration menu - View commit details
-
Copy full SHA for 8f1f4aa - Browse repository at this point
Copy the full SHA 8f1f4aaView commit details
This comparison is taking too long to generate.
Unfortunately it looks like we can’t render this comparison for you right now. It might be too big, or there might be something weird with your repository.
You can try running this command locally to see the comparison on your machine:
git diff 6.8.0...6.9.0