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

Prevent deduplication of PageObject #1105

Merged
merged 2 commits into from
Jul 16, 2022
Merged

Prevent deduplication of PageObject #1105

merged 2 commits into from
Jul 16, 2022

Conversation

Hatell
Copy link
Contributor

@Hatell Hatell commented Jul 14, 2022

In issue #1102 adobe reader/acrobat doesn't like if same page is referred more than one time

@codecov
Copy link

codecov bot commented Jul 14, 2022

Codecov Report

Merging #1105 (9f95bf3) into main (682eff9) will increase coverage by 0.00%.
The diff coverage is 100.00%.

@@           Coverage Diff           @@
##             main    #1105   +/-   ##
=======================================
  Coverage   91.94%   91.95%           
=======================================
  Files          24       24           
  Lines        4642     4646    +4     
  Branches      957      957           
=======================================
+ Hits         4268     4272    +4     
  Misses        229      229           
  Partials      145      145           
Impacted Files Coverage Δ
PyPDF2/_page.py 92.19% <100.00%> (+0.06%) ⬆️

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 682eff9...9f95bf3. Read the comment docs.

@MartinThoma
Copy link
Member

Does this change fix #1102 ?

@Hatell
Copy link
Contributor Author

Hatell commented Jul 15, 2022

I haven't yet confirmed that.

@Hatell
Copy link
Contributor Author

Hatell commented Jul 15, 2022

I can now confirm this. Seem to be bug in Adobe Acrobat Reader or something like that. I tested this and confirmed that PDF doesn't shown properly Acrobat Reader DC, 2015 Release, Version 2015.007.20033.

This changes fixes #1102.

Can you find anything from PDF definition document regarding this page object usage multiple times.

@MartinThoma MartinThoma added the soon PRs that are almost ready to be merged, issues that get solved pretty soon label Jul 15, 2022
@MartinThoma
Copy link
Member

I'm pretty busy today, but I plan to merge + release this pr this weekend. Thank you already for it ❤️

@MartinThoma MartinThoma merged commit dd2d69a into py-pdf:main Jul 16, 2022
MartinThoma added a commit that referenced this pull request Jul 17, 2022
New Features (ENH):
-  Add color and font_format to PdfReader.outlines[i] (#1104)
-  Extract Text Enhancement (whitespaces) (#1084)

Bug Fixes (BUG):
-  Use `build_destination` for named destination outlines (#1128)
-  Avoid a crash when a ToUnicode CMap has an empty dstString in beginbfchar (#1118)
-  Prevent deduplication of PageObject (#1105)
-  None-check in DictionaryObject.read_from_stream (#1113)
-  Avoid IndexError in _cmap.parse_to_unicode (#1110)

Documentation (DOC):
-  Explanation for git submodule
-  Watermark and stamp (#1095)

Maintenance (MAINT):
-  Text extraction improvements (#1126)
-  Destination.color returns ArrayObject instead of tuple as fallback (#1119)
-  Use add_bookmark_destination in add_bookmark (#1100)
-  Use add_bookmark_destination in add_bookmark_dict (#1099)

Testing (TST):
-  Remove xfail from test_outline_title_issue_1121
-  Add test for arab text (#1127)
-  Add xfail for decryption fail (#1125)
-  Add xfail test for IndexError when extracting text (#1124)
-  Add MCVE showing outline title issue (#1123)

Code Style (STY):
-  Apply black and isort
-  Use IntFlag for permissions_flag / update_page_form_field_values (#1094)
-  Simplify code (#1101)

Full Changelog: 2.5.0...2.6.0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
soon PRs that are almost ready to be merged, issues that get solved pretty soon
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants