-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Permalink
Choose a base ref
{{ refName }}
default
Choose a head ref
{{ refName }}
default
Comparing changes
Choose two branches to see what’s changed or to start a new pull request.
If you need to, you can also or
learn more about diff comparisons.
Open a pull request
Create a new pull request by comparing changes across two branches. If you need to, you can also .
Learn more about diff comparisons here.
base repository: py-pdf/pypdf
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 2.12.1
Could not load branches
Nothing to show
Loading
Could not load tags
Nothing to show
{{ refName }}
default
Loading
...
head repository: py-pdf/pypdf
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 3.0.0
Could not load branches
Nothing to show
Loading
Could not load tags
Nothing to show
{{ refName }}
default
Loading
- 14 commits
- 36 files changed
- 5 contributors
Commits on Dec 10, 2022
-
MAINT: Refactor Fit / Zoom parameters (#1437)
Introduce a new `PyPDF2.generic.Fit` class which captures the type and parameter for how a page should be fit in the viewer (e.g. when clicking on a PDF-internal link). The class has one method for each fit type which allows users to discover the different types via their IDE, e.g. `Fit.xyz(left=123, top=456, zoom=2)`. ## Breaking Change This **introduces a breaking change** that needs a major version bump. Affected are the following methods: * `PdfMerger.add_outline_item` used `fit: FitType` and `*args: ZoomArgType` parameters * `PdfWriter.add_outline_item` used `fit: FitType` and `*args: ZoomArgType` parameters * `AnnotationBuilder.link` used `fit: FitType = "/Fit"` and `fit_args: Tuple[ZoomArgType, ...] = tuple()` instead. Instead of having two arguments, we now have only one. To that argument, an object of the new `Fit` class must be passed. ## Why *args is problematic Using the `*args` pattern is problematic for two reasons: * **User-code readability**: * People cannot use the more expressive keyword-argument syntax in their code for the non-fit parameters * People may or may not use the keyword-parameter for the fit parameters * **Library extensions**: PyPDF2 cannot easily add new parameter to those functions; #1371 is the latest PR that stumbled over this issue * **Two parameter for one thing**: In general I don't like if we have two parameters for one topic
Configuration menu - View commit details
-
Copy full SHA for 7633477 - Browse repository at this point
Copy the full SHA 7633477View commit details -
Configuration menu - View commit details
-
Copy full SHA for 437aec9 - Browse repository at this point
Copy the full SHA 437aec9View commit details
Commits on Dec 11, 2022
-
ENH: Allow int for indirect_reference in PdfWriter.get_object (#1490)
Co-authored-by: pubpub-zz <4083478+pubpub-zz@users.noreply.github.com>
Configuration menu - View commit details
-
Copy full SHA for 2aba718 - Browse repository at this point
Copy the full SHA 2aba718View commit details -
Configuration menu - View commit details
-
Copy full SHA for 9674f5f - Browse repository at this point
Copy the full SHA 9674f5fView commit details -
The method `.clone(pdf_dest,[force_duplicate])` clones the objects and all referenced objects. If an object is already cloned, the already cloned object is returned (unless force_duplicate is set) mainly for internal use but can be used on a page for pageObject/DictionnaryObject/[Encoded/Decoded/Content]Stream an extra parameter ignore_fields list that provide the list of fields that should not be cloned. When available, the pointer to an object is available in `indirect_obj` attribute. New API for add_page/insert_page that : * returns the cloned page object * ignore_fields can be provided as a parameter. ## Others * file is closed at the end of PdfWriter.write when a filename is provided * Breaking Change: `add_outline_item` now has a parameter before which is not the last parameter ## Update * The public API of PdfMerger has been added to PdfWriter (ready to make PdfMerger an alias of it) * Process properly Outline merging * Process properly Named destinated Deals with #1194, #1322, #471, #1337
Configuration menu - View commit details
-
Copy full SHA for 74b8a63 - Browse repository at this point
Copy the full SHA 74b8a63View commit details
Commits on Dec 12, 2022
-
Configuration menu - View commit details
-
Copy full SHA for 690247a - Browse repository at this point
Copy the full SHA 690247aView commit details
Commits on Dec 13, 2022
-
Configuration menu - View commit details
-
Copy full SHA for 10ab085 - Browse repository at this point
Copy the full SHA 10ab085View commit details
Commits on Dec 15, 2022
-
MAINT: Use typing.IO for file streams (#1498)
In addition, the following changes were made: * DEV: Add in-project virtual envs to .gitignore Many developers (like myself) like to use virtual environments included within the current project. These virtual environment are local development constructs and should not be checked into source control. This commit adds two common virtual environment directory names to the .gitignore to avoid accidental commits from future developers. * DEV: Include `pillow` in `requirements/dev.in` The current contribution instructions in `docs/dev/intro.md` direct new code contributors to install the `dev` requirements. After following that instruction, the minimal test suite fails. This commit adds `pillow` to `requirements/dev.in` so that the minimal test suite can pass on the first try so that new code contributors can start implementing improvements with confidence. * STY: Use official `IO` type for file streams The Python standard library provides the `IO` type for file streams. (Source: https://docs.python.org/3/library/typing.html#typing.IO) This commit replaces the complex Union type of the `IO` implementations with the official `IO` type. This will improve the accuracy of type checking in users' IDEs. * STY: Use standard `IO` type hint for writers The CI system flagged some additional conflicts with the `IO` type in the writer classes. This commit changes the writer classes to use the standard `IO` type instead of the union of IO implementations.
Configuration menu - View commit details
-
Copy full SHA for b8f787e - Browse repository at this point
Copy the full SHA b8f787eView commit details -
Configuration menu - View commit details
-
Copy full SHA for c95eabf - Browse repository at this point
Copy the full SHA c95eabfView commit details
Commits on Dec 17, 2022
-
MAINT: Deprecate features with PyPDF2==3.0.0 (#1489)
Deprecate features, but keep helpful exceptions. That means that the names still need to be there. The deprecated names will stay until 4.0.0 to help the community transition to the new names.
Configuration menu - View commit details
-
Copy full SHA for a4629d3 - Browse repository at this point
Copy the full SHA a4629d3View commit details -
Configuration menu - View commit details
-
Copy full SHA for 9b23a39 - Browse repository at this point
Copy the full SHA 9b23a39View commit details -
Configuration menu - View commit details
-
Copy full SHA for e5e26ad - Browse repository at this point
Copy the full SHA e5e26adView commit details
Commits on Dec 20, 2022
-
Configuration menu - View commit details
-
Copy full SHA for 3fb9b69 - Browse repository at this point
Copy the full SHA 3fb9b69View commit details
Commits on Dec 22, 2022
-
BREAKING CHANGES: - Deprecate features with PyPDF2==3.0.0 (#1489) - Refactor Fit / Zoom parameters (#1437) New Features (ENH): - Add Cloning (#1371) - Allow int for indirect_reference in PdfWriter.get_object (#1490) Documentation (DOC): - How to read PDFs from S3 (#1509) - Make MyST parse all links as simple hyperlinks (#1506) - Changed 'latest' for 'stable' generated docs (#1495) - Adjust deprecation procedure (#1487) Maintenance (MAINT): - Use typing.IO for file streams (#1498) [Full Changelog](2.12.1...3.0.0)
Configuration menu - View commit details
-
Copy full SHA for 3214dde - Browse repository at this point
Copy the full SHA 3214ddeView commit details
Loading
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.12.1...3.0.0