ICEpdf
  1. ICEpdf
  2. PDF-902

EmptyStackException thrown when rendering a PDF

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 5.1.2
    • Fix Version/s: 6.0
    • Component/s: Core/Rendering
    • Labels:
      None
    • Environment:
      All

      Description

      When rendering the provided PDF file the following exception is thrown:

      WARNING: Error parsing content stream.
      java.util.EmptyStackException
      at java.util.Stack.peek(Stack.java:102)
      at java.util.Stack.pop(Stack.java:84)
      at org.icepdf.core.util.content.AbstractContentParser.consume_re(AbstractContentParser.java:1064)
      at org.icepdf.core.util.content.NContentParser.parse(Unknown Source)
      at org.icepdf.core.pobjects.Page.init(Page.java:392)
      at org.icepdf.ri.common.views.PageViewComponentImpl$PageInitializer.run(PageViewComponentImpl.java:1155)
      at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
      at java.lang.Thread.run(Thread.java:745)

      It is possible this is causing the first page of the PDF to render with missing content (half of the page) as well as missing borders.

        Activity

        Hide
        Patrick Corless added a comment -

        The PDF in question has some very odd syntax that is for lack of a better word malformed. The following rectangle definition:

        9.35 551.74 17.99 +2.39 re f

        The plus sign is used for the last coordinate of the rectangle which is outside the spec. This shouldn't be to hard to adjust for though, will add a parser fix.

        Show
        Patrick Corless added a comment - The PDF in question has some very odd syntax that is for lack of a better word malformed. The following rectangle definition: 9.35 551.74 17.99 +2.39 re f The plus sign is used for the last coordinate of the rectangle which is outside the spec. This shouldn't be to hard to adjust for though, will add a parser fix.
        Hide
        Patrick Corless added a comment -

        We have some specially character handling for the negative symbol which can be duplicated for the positive symbol. Updated Lexer, marking as fixed.

        Show
        Patrick Corless added a comment - We have some specially character handling for the negative symbol which can be duplicated for the positive symbol. Updated Lexer, marking as fixed.
        Hide
        Patrick Corless added a comment -

        Marking as closed

        Show
        Patrick Corless added a comment - Marking as closed

          People

          • Assignee:
            Patrick Corless
            Reporter:
            Arran Mccullough
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: