-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
PDFs aren't merged properly #1062
Comments
I will check this. |
MartinThoma
added
is-bug
From a users perspective, this is a bug - a violation of the expected behavior with a compliant PDF
PdfMerger
The PdfMerger component is affected
PdfWriter
The PdfWriter component is affected
labels
Jul 5, 2022
MartinThoma
added a commit
that referenced
this issue
Jul 5, 2022
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
MartinThoma
added a commit
that referenced
this issue
Jul 5, 2022
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
@MartinThoma I've checked how code will behave on |
It seems that objects sweep iteration is stopped too early. I made pull request to fix issue. |
MartinThoma
added a commit
that referenced
this issue
Jul 5, 2022
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
@gprzyby |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
After upgrading from version 1.28.1 to version 2.4.1 I've faced an issue with merging linked pdfs.
I've also checked previous versions and problem appears after 2.0.0 version
Environment
$ python -m platform Linux-5.18.5-200.fc36.x86_64-x86_64-with-glibc2.28 $ python -c "import PyPDF2;print(PyPDF2.__version__)" 2.4.1
Code + PDF
PDFs:
file1.pdf
file2.pdf
merged.pdf
Traceback
There is no traceback, but after checking merged.pdf content from file2.pdf dosen't exists, but that slide has dimensions from file2.pdf
It looks like dimensions are from file2.pdf, but image comes from first slide of file1.pdf
Expected behavior
In second slide of merged.pdf we could see slides from file2.pdf
The text was updated successfully, but these errors were encountered: