-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Closed
Labels
PdfWriterThe PdfWriter component is affectedThe PdfWriter component is affectedis-regressionRegression introduced as a side-effect of another changeRegression introduced as a side-effect of another change
Description
Calling page.transfer_rotation_to_content()
changes the visibility of some content after upgrading from version 4.2.0 to 4.3.0 for some PDF files. The corresponding text layer is invisible, but can be selected.
When viewing the diff, two Q
operators are missing in version 4.3.0.
Environment
Which environment were you using when you encountered the problem?
$ python -m platform
Linux-6.4.0-150600.23.25-default-x86_64-with-glibc2.38
$ python -c "import pypdf;print(pypdf._debug_versions)"
pypdf==5.1.0, crypt_provider=('local_crypt_fallback', '0.0.0'), PIL=none
Code + PDF
This is a minimal, complete example that shows the issue:
from pypdf import PdfWriter
writer = PdfWriter(clone_from='file.pdf')
for page in writer.pages:
page.transfer_rotation_to_content()
writer.write('out.pdf')
I do not have a suitable PDF file at the moment, but I am working on getting one.
Metadata
Metadata
Assignees
Labels
PdfWriterThe PdfWriter component is affectedThe PdfWriter component is affectedis-regressionRegression introduced as a side-effect of another changeRegression introduced as a side-effect of another change