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: Add RunLengthDecode filter #2012

Merged
merged 6 commits into from
Jul 29, 2023
Merged

Conversation

pubpub-zz
Copy link
Collaborator

closes #2011

@pubpub-zz
Copy link
Collaborator Author

Note for @MartinThoma
you should have a look at the call of the decode function https://github.com/pubpub-zz/PyPDF2/blob/b2d890e143a0ab45addf55ae08f7086d126038df/pypdf/filters.py#L663:L686 the decode should accept bytes (only) and return (bytes) only : maybe something to check in the different decoders

@codecov
Copy link

codecov bot commented Jul 25, 2023

Codecov Report

Patch coverage: 91.66% and project coverage change: -0.01% ⚠️

Comparison is base (6b70364) 94.16% compared to head (e7424fb) 94.16%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2012      +/-   ##
==========================================
- Coverage   94.16%   94.16%   -0.01%     
==========================================
  Files          41       41              
  Lines        7289     7313      +24     
  Branches     1429     1434       +5     
==========================================
+ Hits         6864     6886      +22     
- Misses        265      266       +1     
- Partials      160      161       +1     
Files Changed Coverage Δ
pypdf/filters.py 93.72% <91.66%> (-0.11%) ⬇️

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@pubpub-zz
Copy link
Collaborator Author

test file to complete test:
Missing EOD:
MissingEOD.pdf
Early EOD:
EarlyEOD.pdf

@pubpub-zz
Copy link
Collaborator Author

@MartinThoma
All yours😀

@MartinThoma MartinThoma changed the title BUG : add RunLengthDecode filter BUG: Add RunLengthDecode filter Jul 29, 2023
@MartinThoma MartinThoma added the soon PRs that are almost ready to be merged, issues that get solved pretty soon label Jul 29, 2023
tests/test_filters.py Outdated Show resolved Hide resolved
tests/test_filters.py Outdated Show resolved Hide resolved
@MartinThoma MartinThoma merged commit 3d7206c into py-pdf:main Jul 29, 2023
MartinThoma added a commit that referenced this pull request Jul 29, 2023
## What's new

### New Features (ENH)
-  Accelerate image list keys generation (#2014)
-  Use `cryptography` for encryption/decryption as a fallback for PyCryptodome (#2000)
-  Extract LaTeX characters (#2016)
-  ASCIIHexDecode.decode now returns bytes instead of str (#1994)

### Bug Fixes (BUG)
-  Add RunLengthDecode filter (#2012)
-  Process /Separation ColorSpace (#2007)
-  Handle single element ColorSpace list (#2026)
-  Process lookup decoded as TextStringObjects (#2008)

### Robustness (ROB)
-  Cope with garbage collector during cloning (#1841)

### Maintenance (MAINT)
-  Cleanup of annotations (#1745)

[Full Changelog](3.13.0...3.14.0)
@pubpub-zz pubpub-zz deleted the runlengthfilter branch September 2, 2023 09:45
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.

NotImplementedError: unsupported filter /RunLengthDecode
2 participants