Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BUG: Wrong page inserted when PdfMerger.merge is done #1063

Merged
merged 3 commits into from
Jul 5, 2022
Merged

Conversation

MartinThoma
Copy link
Member

Caused-by: #207

Why it wasn't detected by the tests: We don't have any tests that check
for the correct result of a merge. We just check for exceptions

How we prevent it in future: Unit test was added

Risk of the fix:

Closes: #1062

Caused-by: #207

Why it wasn't detected by the tests: We don't have any tests that check
for the correct result of a merge. We just check for exceptions

How we prevent it in future: Unit test was added

Risk of the fix:
- We will have bigger file sizes again as #207 was effectively reverted
- We will need to adjust this test if we change the way we write PDFs

Closes: #1062
@codecov
Copy link

codecov bot commented Jul 5, 2022

Codecov Report

Merging #1063 (0a09830) into main (1e9c4dd) will decrease coverage by 0.03%.
The diff coverage is n/a.

@@            Coverage Diff             @@
##             main    #1063      +/-   ##
==========================================
- Coverage   90.89%   90.86%   -0.04%     
==========================================
  Files          24       24              
  Lines        4515     4508       -7     
  Branches      923      920       -3     
==========================================
- Hits         4104     4096       -8     
- Misses        268      271       +3     
+ Partials      143      141       -2     
Impacted Files Coverage Δ
PyPDF2/_writer.py 89.06% <ø> (+0.21%) ⬆️
PyPDF2/generic.py 91.23% <0.00%> (-0.33%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 1e9c4dd...0a09830. Read the comment docs.

@MartinThoma MartinThoma merged commit 621a51f into main Jul 5, 2022
@MartinThoma MartinThoma deleted the issue-1062 branch July 5, 2022 12:34
MartinThoma added a commit that referenced this pull request Jul 5, 2022
New Features (ENH):
-  Add PdfReader.xfa attribute (#1026)

Bug Fixes (BUG):
-  Wrong page inserted when PdfMerger.merge is done (#1063)
-  Resolve IndirectObject when it refers to a free entry (#1054)

Developer Experience (DEV):
-  Added {posargs} to tox.ini (#1055)

Maintenance (MAINT):
-  Remove PyPDF2._utils.bytes_type (#1053)

Testing (TST):
-  Scale page (indirect rect object) (#1057)
-  Simplify pathlib PdfReader test (#1056)
-  IndexError of VirtualList (#1052)
-  Invalid XML in xmp information (#1051)
-  No pycryptodome (#1050)
-  Increase test coverage (#1045)

Code Style (STY):
-  DOC of compress_content_streams (#1061)
-  Minimize diff for #879 (#1049)

Full Changelog: 2.4.1...2.4.2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

PDFs aren't merged properly
1 participant