py-pdf / pypdf

A pure-python PDF library capable of splitting, merging, cropping, and transforming the pages of PDF files
https://pypdf.readthedocs.io/en/latest/
Other
7.73k stars 1.36k forks source link

ROB: cope with missing Standard 14 fonts in fields #2677

Closed pubpub-zz closed 4 weeks ago

pubpub-zz commented 1 month ago

closes #2670

in alternative to #2671

codecov[bot] commented 1 month ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 95.13%. Comparing base (44d08ae) to head (5dda438).

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #2677 +/- ## ======================================= Coverage 95.13% 95.13% ======================================= Files 51 51 Lines 8538 8538 Branches 1702 1702 ======================================= Hits 8123 8123 Misses 261 261 Partials 154 154 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

pubpub-zz commented 1 month ago

@BrooksWatson717 / @stefan6419846

Your opinion ?

stefan6419846 commented 1 month ago

Compared to #2671, how does this behave if the font is missing? #2671 would add the font entry, this PR just skips the logic conditionally. Does this have an effect on real-world usage?

pubpub-zz commented 1 month ago

Compared to #2671, how does this behave if the font is missing? #2671 would add the font entry, this PR just skips the logic conditionally. Does this have an effect on real-world usage?

Helvetica font is part of the default fonts that may not be defined. Also if you want to declare the font you need the full definition with far much more data than proposed in #2671