Return read data instead of throwing "Unexpected EOD in RunLengthDecode/ASCIIHexDecode"? #2303
Labels
Has MCVE
A minimal, complete and verifiable example helps a lot to debug / understand feature requests
workflow-images
From a users perspective, image handling is the affected feature/workflow
I am currently experiencing some issues about
Unexpected EOD in RunLengthDecode
when extracting images from some PDF files. Is there any reason to use a hard exception there instead oflogger_warning
and returning the read data?In a specific case, PDFBox Debugger, MuPDF and Evince are able to correctly extract the image; replacing the exception with a return value in
pypdf.filters.RunLengthDecode.decode
seems to produce an image which only seems to contain the wrong colors.Environment
Code + PDF
This is a minimal, complete example that shows the issue:
out1.pdf
Traceback
This is the complete traceback I see:
The text was updated successfully, but these errors were encountered: