ICEpdf
  1. ICEpdf
  2. PDF-315

Error initializing PDF when using specific OCR tool

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Duplicate
    • Affects Version/s: 4.2
    • Fix Version/s: 4.2.2
    • Component/s: Core/Parsing
    • Labels:
      None
    • Environment:
      -

      Description

      The issue depends on which OCR tool is used, most notably PixEdit: http://www.pixedit.com/ocr.aspx. The attached test file "10279_Regular.pdf" has been used to create "10279_OCR.pdf" using PixEdit. When viewing the OCR version, the following exception is thrown by ICEpdf:

      FINE: Error initializing Page.
      java.util.EmptyStackException
      at java.util.Stack.peek(Stack.java:85)
      at java.util.Stack.pop(Stack.java:67)
      at org.icepdf.core.util.ContentParser.consume_rg(ContentParser.java:1646)
      at org.icepdf.core.util.ContentParser.parse(ContentParser.java:592)
      at org.icepdf.core.pobjects.Page.init(Page.java:390)
      at org.icepdf.core.views.swing.PageViewComponentImpl$PageInitilizer.run(PageViewComponentImpl.java:1077)
      at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
      at java.lang.Thread.run(Thread.java:680)

        Activity

        Hide
        Patrick Corless added a comment -

        This is related to a malformed content stream.

        Q0 0 0 rg

        For some reason the encoder is properly inserting a space between the Q and 0. PDF-215 describes a similar problem from another encoder. Good news is that there is a fix for it and is available in the 4.2.2 preview 1 release.

        Show
        Patrick Corless added a comment - This is related to a malformed content stream. Q0 0 0 rg For some reason the encoder is properly inserting a space between the Q and 0. PDF-215 describes a similar problem from another encoder. Good news is that there is a fix for it and is available in the 4.2.2 preview 1 release.

          People

          • Assignee:
            Patrick Corless
            Reporter:
            Tyler Johnson
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: