-
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: 2.4.0
head repository: py-pdf/pypdf
compare: 2.4.1
- 14 commits
- 28 files changed
- 5 contributors
Commits on Jun 28, 2022
-
DOC: Add CHANGELOG to the rendered docs (#1023)
Co-authored-by: Matthew Peveler <matt.peveler@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for c7d2450 - Browse repository at this point
Copy the full SHA c7d2450View commit details -
PI: Check duplicate objects in writer._sweep_indirect_references (#207)
This check can reduce the file size significantly when writing PDFs and there are objects used multiple times, for example images. If you read- and write a file again, this can already reduce the file size: ```python from PyPDF2 import PdfReader, PdfWriter reader = PdfReader("big-old-file.pdf") writer = PdfWriter() for page in reader.pages: writer.add_page(page) writer.add_metadata(reader.metadata) with open("smaller-new-file.pdf", "wb") as fp: writer.write(fp) ``` For the following files, the size was reduced significantly: * https://corpora.tika.apache.org/base/docs/govdocs1/958/958893.pdf : 5.7 MB ➔ 0.8 MB (-4.9 MB / -86%) * https://corpora.tika.apache.org/base/docs/govdocs1/949/949428.pdf : 6.7 MB ➔ 1.9 MB (-4.8 MB / -72%) * https://corpora.tika.apache.org/base/docs/govdocs1/911/911140.pdf : 8.8 MB ➔ 4.3 MB (-4.5 MB / -51%) Co-authored-by: Harry Karvonen <harry.karvonen@onebyte.fi>Configuration menu - View commit details
-
Copy full SHA for ed832b3 - Browse repository at this point
Copy the full SHA ed832b3View commit details -
STY: Docstring formatting (#1033)
See PEP-257 for some guides. flake8-naming was used to find those spots. The "rtype" (return type) was removed from the docstrings as it already is in the type annotation in a more readable way + linked with the used type. It's also checked by mypy in the function signature.
Configuration menu - View commit details
-
Copy full SHA for a89ff74 - Browse repository at this point
Copy the full SHA a89ff74View commit details -
Configuration menu - View commit details
-
Copy full SHA for 2c8914e - Browse repository at this point
Copy the full SHA 2c8914eView commit details
Commits on Jun 29, 2022
-
Configuration menu - View commit details
-
Copy full SHA for 08c54d9 - Browse repository at this point
Copy the full SHA 08c54d9View commit details -
Configuration menu - View commit details
-
Copy full SHA for f2ffa7a - Browse repository at this point
Copy the full SHA f2ffa7aView commit details -
DOC: Remove hyphen from lossless (#1041)
Signed-off-by: Matthew Peveler <matt.peveler@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for 0215cc7 - Browse repository at this point
Copy the full SHA 0215cc7View commit details -
ENH: Add writer.pdf_header property (getter and setter) (#1038)
When writing a PDF, set the version to the highest PDF version of the written ones Closes #162 Co-authored-by: Matthew Peveler <matt.peveler@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for eedf0e0 - Browse repository at this point
Copy the full SHA eedf0e0View commit details -
Configuration menu - View commit details
-
Copy full SHA for a85c7e7 - Browse repository at this point
Copy the full SHA a85c7e7View commit details -
Configuration menu - View commit details
-
Copy full SHA for d1f2ed2 - Browse repository at this point
Copy the full SHA d1f2ed2View commit details
Commits on Jun 30, 2022
-
Configuration menu - View commit details
-
Copy full SHA for 84c3e33 - Browse repository at this point
Copy the full SHA 84c3e33View commit details -
PI: Remove b_ call in FloatObject.write_to_stream (#1044)
Also in writer.encrypt
Configuration menu - View commit details
-
Copy full SHA for f1281b9 - Browse repository at this point
Copy the full SHA f1281b9View commit details -
Configuration menu - View commit details
-
Copy full SHA for 97f36bd - Browse repository at this point
Copy the full SHA 97f36bdView commit details -
New Features (ENH): - Add writer.pdf_header property (getter and setter) (#1038) Performance Improvements (PI): - Remove b_ call in FloatObject.write_to_stream (#1044) - Check duplicate objects in writer._sweep_indirect_references (#207) Documentation (DOC): - How to surppress exceptions/warnings/log messages (#1037) - Remove hyphen from lossless (#1041) - Compression of content streams (#1040) - Fix inconsistent variable names in add-watermark.md (#1039) - File size reduction - Add CHANGELOG to the rendered docs (#1023) Maintenance (MAINT): - Handle XML error when reading XmpInformation (#1030) - Deduplicate Code / add mutmut config (#1022) Code Style (STY): - Use unnecessary one-line function / class attribute (#1043) - Docstring formatting (#1033) Full Changelog: 2.4.0...2.4.1
Configuration menu - View commit details
-
Copy full SHA for 66f00fc - Browse repository at this point
Copy the full SHA 66f00fcView 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 2.4.0...2.4.1