You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pdfbox.apache.org by "Tilman Hausherr (JIRA)" <ji...@apache.org> on 2017/09/15 16:29:00 UTC

[jira] [Created] (PDFBOX-3932) Image with predictor 15 not rendered correctly

Tilman Hausherr created PDFBOX-3932:
---------------------------------------

             Summary: Image with predictor 15 not rendered correctly
                 Key: PDFBOX-3932
                 URL: https://issues.apache.org/jira/browse/PDFBOX-3932
             Project: PDFBox
          Issue Type: Bug
          Components: Rendering
    Affects Versions: 2.0.7, 1.8.13
            Reporter: Tilman Hausherr
            Assignee: Tilman Hausherr
             Fix For: 1.8.14, 2.0.8, 3.0.0
         Attachments: PDFJS-8895-p1.pdf

In this file, /DecodeParms has an array with 1 element. The filter is a name object.

The PDF specification has this:

bq. A parameter dictionary or an array of such dictionaries, used by the filters specified by Filter. If there is only one filter and that filter has parameters, DecodeParms shall be set to the filter's parameter dictionary unless all the filter's parameters have their default values, in which case the DecodeParms entry may be omitted. If there are multiple filters and any of the filters has parameters set to nondefault values, DecodeParms shall be an array with one entry for each filter: either the parameter dictionary for that filter, or the null object if that filter has no parameters (or if all of its parameters have their default values). If none of the filters have parameters, or if all their parameters have default values, the DecodeParms entry may be omitted.

Currently PDFBox takes "whatever is there" from the /DecodeParms array / dictionary.

So now I tried to implement this 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 elemenent 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.

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.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@pdfbox.apache.org
For additional commands, e-mail: dev-help@pdfbox.apache.org