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

        Hide
        Patrick Corless added a comment -

        sample 1, correctly renders.

        Show
        Patrick Corless added a comment - sample 1, correctly renders.
        Hide
        Patrick Corless added a comment -

        File does not rendering correctly.

        Show
        Patrick Corless added a comment - File does not rendering correctly.
        Hide
        Patrick Corless added a comment -

        Pushing out to a future release.

        Show
        Patrick Corless added a comment - Pushing out to a future release.
        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.
        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.
        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.
        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
        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
        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.
        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 -

        Closing

        Show
        Patrick Corless added a comment - Closing

          People

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

            Dates

            • Created:
              Updated:
              Resolved: