-
Notifications
You must be signed in to change notification settings - Fork 313
PdfPig 0.1.11 breaks image decoding with "Decoded stream size exceeds estimated maximum" error #1125
Copy link
Copy link
Closed
Description
Issue Summary
After updating the following packages:
PdfPigfrom0.1.10to0.1.11PdfPig.Filters.Dct.JpegLibraryfrom0.1.10.2to0.1.11
I'm getting a PdfDocumentFormatException when trying to read a specific PDF file.
Exception
UglyToad.PdfPig.Core.PdfDocumentFormatException: Decoded stream size exceeds the estimated maximum size.
Current decoded stream length: 2266737, 1 filters applied out of 2.
This happens during image extraction for an XObject image.
Rolling back to the previous versions resolves the issue.
Additional Notes
- The exception is thrown while processing an image with width 1379 px and height 236.64 px.
- The error seems to be related to the new version of
PdfPig.Filters.Dct.JpegLibrary.
Attachments
- A screenshot showing the exact code and exception:
- The PDF file used to reproduce the issue
testCase.pdf - A minimal reproducible example in a ZIP file: this contains a small Visual Studio project that triggers the error directly
PdfPigTest.7z.txt (Please rename the attached file from.txtback to.7zbefore extracting.)
Steps to Reproduce
- Open and run the attached sample project
- The exception is thrown during image extraction using
TryGetPng()orGetImageBytes()
Expected Behavior
The image should be decoded without throwing an exception, as it was in version 0.1.10.
Please let me know if you need further details or if I can help further in some way.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels