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 dictionary access of optional page label keys #1562

Merged
merged 2 commits into from
Jan 18, 2023

Conversation

MartinThoma
Copy link
Member

@MartinThoma MartinThoma commented Jan 18, 2023

Fixes #1560

TODO

Add a (minimal) test which shows this issue. Maybe we can adjust resources/pdflatex-outline.pdf?

Fixes #1560

Co-authored-by: jonahmajumder <jmajumder9@gmail.com>
@codecov
Copy link

codecov bot commented Jan 18, 2023

Codecov Report

Base: 91.86% // Head: 91.86% // Increases project coverage by +0.00% 🎉

Coverage data is based on head (47caf7b) compared to base (f494e61).
Patch coverage: 100.00% of modified lines in pull request are covered.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1562   +/-   ##
=======================================
  Coverage   91.86%   91.86%           
=======================================
  Files          33       33           
  Lines        6122     6124    +2     
  Branches     1208     1208           
=======================================
+ Hits         5624     5626    +2     
  Misses        322      322           
  Partials      176      176           
Impacted Files Coverage Δ
pypdf/_page_labels.py 79.66% <100.00%> (+0.71%) ⬆️

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.

pypdf/_page_labels.py Outdated Show resolved Hide resolved
@jonahmajumder
Copy link
Contributor

@pubpub-zz I was about to point that out. Otherwise looks good to me. Thanks.

Co-authored-by: pubpub-zz <4083478+pubpub-zz@users.noreply.github.com>
@MartinThoma
Copy link
Member Author

Thank you both for the review!

@MartinThoma MartinThoma merged commit c293b95 into main Jan 18, 2023
@MartinThoma MartinThoma deleted the fix-page-labels branch January 18, 2023 20:03
MartinThoma added a commit that referenced this pull request Jan 22, 2023
New Features (ENH):
-  Add page label support to PdfWriter (#1558)
-  Accept inline images with space before EI (#1552)
-  Add circle annotation support (#1556)
-  Add polygon annotation support (#1557)
-  Make merging pages produce a deterministic PDF (#1542, #1543)

Bug Fixes (BUG):
-  Fix error in cmap extraction (#1544)
-  Remove erroneous assertion check (#1564)
-  Fix dictionary access of optional page label keys (#1562)

Robustness (ROB):
-  Set ignore_eof=True for read_until_regex (#1521)

Documentation (DOC):
-  Paper size (#1550)

Developer Experience (DEV):
-  Fix broken combination of dependencies of docs.txt
-  Annotate tests appropriately (#1551)

[Full Changelog](3.2.1...3.3.0)
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.

Page Label Access Fails when PDF PageLabels Number Tree Does Not Contain "/S"
3 participants