MatthiasValvekens / pyHanko

pyHanko: sign and stamp PDF files
MIT License
460 stars 68 forks source link

Tolerate AcroForms without a Fields entry #404

Closed MatthiasValvekens closed 4 months ago

MatthiasValvekens commented 4 months ago

Description of the changes

Tolerate AcroForm dictionaries that don't contain a Fields entry when making changes to a PDF. We'll create it on the fly if needed, even though the input document would strictly speaking not be valid.

Fixes #403.

Checklist

Please go over this checklist to increase the chances of your PR being worked on in a timely manner. Deviations are allowed with proper justification (see previous section).

For bug fixes (delete if not applicable)

codecov-commenter commented 4 months ago

Codecov Report

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

Project coverage is 98.83%. Comparing base (5a9d8eb) to head (6d4cde9). Report is 1 commits behind head on master.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #404 +/- ## ======================================= Coverage 98.83% 98.83% ======================================= Files 113 113 Lines 16265 16265 ======================================= Hits 16075 16075 Misses 190 190 ``` | [Flag](https://app.codecov.io/gh/MatthiasValvekens/pyHanko/pull/404/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Matthias+Valvekens) | Coverage Δ | | |---|---|---| | [unittests](https://app.codecov.io/gh/MatthiasValvekens/pyHanko/pull/404/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Matthias+Valvekens) | `98.83% <100.00%> (ø)` | | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Matthias+Valvekens#carryforward-flags-in-the-pull-request-comment) to find out more.

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