Skip to content

fix issues with missing destinations (#604)#840

Merged
MartinThoma merged 1 commit intopy-pdf:mainfrom
pubpub-zz:iss604a
Apr 30, 2022
Merged

fix issues with missing destinations (#604)#840
MartinThoma merged 1 commit intopy-pdf:mainfrom
pubpub-zz:iss604a

Conversation

@pubpub-zz
Copy link
Copy Markdown
Collaborator

#604

root cause: probably extraction from a document not extracting properly destination

changes:

getDestinationPageNumber return -1 with NullObject
in case of Strict = False, return a destination to first page to prevent error (no change in case of Strict=True)
note ; warning generated

Test added with the sample test

(duplicate of #821 to match refactoring)

py-pdf#604 

root cause: probably extraction from a document not extracting properly destination

changes:

    getDestinationPageNumber return -1 with NullObject
    in case of Strict = False, return a destination to first page to prevent error (no change in case of Strict=True)
    note ; warning generated

Test added with the sample test

(duplicate of  py-pdf#821 to match refactoring)
@codecov
Copy link
Copy Markdown

codecov bot commented Apr 30, 2022

Codecov Report

Merging #840 (56af049) into main (5e86977) will increase coverage by 0.14%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##             main     #840      +/-   ##
==========================================
+ Coverage   81.65%   81.79%   +0.14%     
==========================================
  Files          16       16              
  Lines        3695     3703       +8     
  Branches      801      803       +2     
==========================================
+ Hits         3017     3029      +12     
+ Misses        502      499       -3     
+ Partials      176      175       -1     
Impacted Files Coverage Δ
PyPDF2/_reader.py 81.16% <100.00%> (+0.72%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 5e86977...56af049. Read the comment docs.

@MartinThoma MartinThoma merged commit 3fe9e6e into py-pdf:main Apr 30, 2022
@pubpub-zz pubpub-zz deleted the iss604a branch April 30, 2022 19:36
MartinThoma added a commit that referenced this pull request May 1, 2022
Robustness (ROB):
-  Handle missing destinations in reader (#840)
-  warn-only in readStringFromStream (#837)
-  Fix corruption in startxref or xref table (#788 and #830)

Documentation (DOC):
-  Project Governance (#799)
-  History of PyPDF2
-  PDF feature/version support (#816)
-  More details on text parsing issues (#815)

Developer Experience (DEV):
-  Add benchmark command to Makefile
-  Ignore IronPython parts for code coverage (#826)

Maintenance (MAINT):
-  Split pdf module (#836)
-  Separated CCITTFax param parsing/decoding (#841)
-  Update requirements files

Testing (TST):
-  Use external repository for larger/more PDFs for testing (#820)
-  Swap incorrect test names (#838)
-  Add test for PdfFileReader and page properties (#835)
-  Add tests for PyPDF2.generic (#831)
-  Add tests for utils, form fields, PageRange (#827)
-  Add test for ASCII85Decode (#825)
-  Add test for FlateDecode (#823)
-  Add test for filters.ASCIIHexDecode (#822)

Code Style (STY):
-  Apply pre-commit (black, isort) + use snake_case variables (#832)
-  Remove debug code (#828)
-  Documentation, Variable names (#839)

Full Changelog: 1.27.9...1.27.10
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