-
Notifications
You must be signed in to change notification settings - Fork 10k
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
Images not rendered / Unsupported predictors 132 & 255 #8895
Comments
Apache PDFBox has the same problem and here's my 2ct on this: In this file, /DecodeParms has an array with 1 element. The filter is a name object. When I removed the predictor (overwrite "/Predictor 15" with blanks) from the PDF then it was rendered properly. The PDF specification has this about /DecodeParms :
Currently PDFBox takes "whatever is there" from the DecodeParms array / dictionary. So now I tried to implement the specification literally in PDFBox ("If there is only one filter and that filter has parameters, DecodeParms shall be set to the filter’s parameter dictionary") and that failed, there are files that have a filter array with 1 element and have a /DecodeParms array with 1 element and these render properly with Adobe Reader, but no longer in PDFBox. So that "incorrect" DecodeParms array element must be used or it will look bad. The PDF specification should read "If there is only one filter as a name object and..." Then I tried to implement that a dictionary would be expected when the filter was only a name, and that worked, i.e. no regressions, and the SOLR file renders too. in parser.js you have this today:
In an older version that I saved years ago the code was like this:
This logic was changed in commit c8f83d6 but I could not find a PR nor did I understand whether it solved a problem with a specific file. Btw the very first page of the PDF has the same issue. |
Fixed by the pull request above. @THausherr Thank you for providing your analysis! |
Link to PDF file (or attach file here):
http://www-eu.apache.org/dist/lucene/solr/ref-guide/apache-solr-ref-guide-6.6.pdf
Configuration:
Steps to reproduce the problem:
What is the expected behavior? (add screenshot)
Images are rendered:
What went wrong? (add screenshot)
Images are not rendered:
Error console:
The text was updated successfully, but these errors were encountered: