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: Fix getter of the PageObject.rotation property with an indirect object #1602

Merged
merged 1 commit into from
Feb 5, 2023

Conversation

mitchelljkotler
Copy link
Contributor

#337 was fixed for rotating a page, but was still broken for getting the rotation angle if it was an indirect object. I have included a fix and a corresponding test.

@codecov
Copy link

codecov bot commented Feb 3, 2023

Codecov Report

Base: 91.89% // Head: 91.89% // Decreases project coverage by -0.01% ⚠️

Coverage data is based on head (7fd6a4c) compared to base (3956eb3).
Patch coverage: 100.00% of modified lines in pull request are covered.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1602      +/-   ##
==========================================
- Coverage   91.89%   91.89%   -0.01%     
==========================================
  Files          33       33              
  Lines        6246     6245       -1     
  Branches     1243     1243              
==========================================
- Hits         5740     5739       -1     
  Misses        326      326              
  Partials      180      180              
Impacted Files Coverage Δ
pypdf/_page.py 89.83% <100.00%> (-0.02%) ⬇️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@MartinThoma MartinThoma merged commit d2c3e1b into py-pdf:main Feb 5, 2023
@MartinThoma MartinThoma changed the title BUG: Fix fetching rotate attribute with an indirect object (#337) BUG: Fix getter of the PageObject.rotation property with an indirect object Feb 5, 2023
@MartinThoma
Copy link
Member

Good work! If you want, I can add you to https://pypdf.readthedocs.io/en/latest/meta/CONTRIBUTORS.html :-)

MartinThoma added a commit that referenced this pull request Feb 5, 2023
NOTICE: pypdf changed the way it represents numbers parsed from PDF files.
  pypdf<3.4.0 represented numbers as Decimal, pypdf>=3.4.0 represents them as
  floats. Several other PDF libraries to this, as well as many PDF viewers.
  We hope to fix issues with too high precision like this and get a speed boost.
  In case your PDF documents rely on more than 18 decimals of precision you
  should check if it still works as expected.
  To clarify: This does not affect the text shown in PDF documents. It affects
  numbers, e.g. when graphics are drawn on the PDF or very exact positions are
  used. Typically, 5 decimals should be enough.

New Features (ENH)
-  Enable merging forms with overlapping names (#1553)
-  Add 'over' parameter to merge_transformend_page & co (#1567)

Bug Fixes (BUG)
-  Fix getter of the PageObject.rotation property with an indirect object (#1602)
-  Restore merge_transformed_page & co (#1567)
-  Replace decimal by float (#1563)

Robustness (ROB)
-  PdfWriter.remove_images: /Contents might not be in page_ref (#1598)

Developer Experience (DEV)
-  Introduce ruff (#1586, #1609)

Maintenance (MAINT)
-  Remove decimal (#1608)

[Full Changelog](3.3.0...3.4.0)
@mitchelljkotler
Copy link
Contributor Author

mitchelljkotler commented Feb 6, 2023 via email

@MartinThoma
Copy link
Member

Done: e4853e4 :-)

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.

2 participants