ICEpdf
  1. ICEpdf
  2. PDF-217

CCITTFax image not decoding correctly.

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 4.1.4
    • Fix Version/s: 5.0.1
    • Component/s: Core/Parsing
    • Labels:
      None
    • Environment:
      any

      Description

      Forum posting posted a two sample files the second document_2.pdf is not correctly rendering the embedded ccitt fax image. The lack of rendering doesn't appear to be a result of recent image work in 4.1.1, the problem occurs in 4.1 as well.

      Likely a stream length issue or the wrong k value is reported.

      1. Document_1.pdf
        257 kB
        Patrick Corless
      2. Document_2.pdf
        24 kB
        Patrick Corless
      3. scanned_document.pdf
        218 kB
        Dmitry Lakhin

        Activity

        Patrick Corless made changes -
        Status Resolved [ 5 ] Closed [ 6 ]
        Patrick Corless made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]
        Hide
        Patrick Corless added a comment -

        Closing

        Show
        Patrick Corless added a comment - Closing
        Hide
        Patrick Corless added a comment -

        Made some change for PDF-337 and PDF-518. I still recommend that the JAI system property is set to true but all document now render correctly.

        Show
        Patrick Corless added a comment - Made some change for PDF-337 and PDF-518 . I still recommend that the JAI system property is set to true but all document now render correctly.
        Hide
        Patrick Corless added a comment -

        Document_1.pdf and scanned_document.pdf can be correctly loaded with -Dorg.icepdf.core.ccittfax.jai=true, however Document_2.pdf does not load, will have to look more closely as to what the problem is.

        Show
        Patrick Corless added a comment - Document_1.pdf and scanned_document.pdf can be correctly loaded with -Dorg.icepdf.core.ccittfax.jai=true, however Document_2.pdf does not load, will have to look more closely as to what the problem is.
        Patrick Corless made changes -
        Fix Version/s 5.0.1 [ 10872 ]
        Fix Version/s 5.0 [ 10314 ]
        Hide
        Dmitry Lakhin added a comment -

        With JAI on the class path it is working. But, as I said, I would like to avoid using it.

        Show
        Dmitry Lakhin added a comment - With JAI on the class path it is working. But, as I said, I would like to avoid using it.
        Hide
        Dmitry Lakhin added a comment - - edited

        Patrick,

        I can confirm, that I don't have JAI on my class path. I would like also to avoid using it to keep the library size small, because it is used also in the applet.

        As I understand there is a fall back code to handle this situation (method Stream.ccittFaxDecode()) and it doesn't seem to be working correctly. Am I right?

        Show
        Dmitry Lakhin added a comment - - edited Patrick, I can confirm, that I don't have JAI on my class path. I would like also to avoid using it to keep the library size small, because it is used also in the applet. As I understand there is a fall back code to handle this situation (method Stream.ccittFaxDecode()) and it doesn't seem to be working correctly. Am I right?
        Hide
        Patrick Corless added a comment -

        On the last file you attached can you make sure that you have JAI on the class path.

        Show
        Patrick Corless added a comment - On the last file you attached can you make sure that you have JAI on the class path.
        Dmitry Lakhin made changes -
        Attachment scanned_document.pdf [ 15318 ]
        Hide
        Dmitry Lakhin added a comment - - edited

        Another scanned document that seems to have the same issue.

        This is a document from one of my customers. I debuged the code until CCITTFaxDecoder class and this is where it gets really complicated.

        The input array for the method CCITTFaxDecoder.decodeT41D() seems to be OK, but the result array contains only zeros.

        Show
        Dmitry Lakhin added a comment - - edited Another scanned document that seems to have the same issue. This is a document from one of my customers. I debuged the code until CCITTFaxDecoder class and this is where it gets really complicated. The input array for the method CCITTFaxDecoder.decodeT41D() seems to be OK, but the result array contains only zeros.
        Patrick Corless made changes -
        Salesforce Case []
        Fix Version/s 5.0 [ 10314 ]
        Fix Version/s 4.3 [ 10266 ]
        Patrick Corless made changes -
        Salesforce Case []
        Hide
        Patrick Corless added a comment -

        Took a quick look at this one and against don't see any reports a decoding error. A much closer look is needed to see what's going wrong during the decode.

        Show
        Patrick Corless added a comment - Took a quick look at this one and against don't see any reports a decoding error. A much closer look is needed to see what's going wrong during the decode.
        Patrick Corless made changes -
        Salesforce Case []
        Fix Version/s 4.3 [ 10266 ]
        Patrick Corless made changes -
        Salesforce Case []
        Fix Version/s 4.2 [ 10243 ]
        Affects Version/s 4.1.4 [ 10264 ]
        Patrick Corless made changes -
        Salesforce Case []
        Affects Version/s 4.1.1 [ 10244 ]
        Hide
        Patrick Corless added a comment -

        Pushing out to a future release.

        Show
        Patrick Corless added a comment - Pushing out to a future release.
        Patrick Corless made changes -
        Salesforce Case []
        Assignee Priority P1
        Patrick Corless made changes -
        Salesforce Case []
        Patrick Corless made changes -
        Salesforce Case []
        Fix Version/s 4.2 [ 10243 ]
        Affects Version/s 4.1.1 [ 10244 ]
        Affects Version/s 4.2 [ 10243 ]
        Patrick Corless made changes -
        Attachment Document_2.pdf [ 12616 ]
        Hide
        Patrick Corless added a comment -

        File does not rendering correctly.

        Show
        Patrick Corless added a comment - File does not rendering correctly.
        Patrick Corless made changes -
        Attachment Document_1.pdf [ 12615 ]
        Hide
        Patrick Corless added a comment -

        sample 1, correctly renders.

        Show
        Patrick Corless added a comment - sample 1, correctly renders.
        Patrick Corless made changes -
        Field Original Value New Value
        Salesforce Case []
        Affects Version/s 4.2 [ 10243 ]
        Affects Version/s 4.1.1 [ 10244 ]
        Patrick Corless created issue -

          People

          • Assignee:
            Patrick Corless
            Reporter:
            Patrick Corless
          • Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: