ICEpdf
  1. ICEpdf
  2. PDF-850

IllegalArgumentException: Color parameter outside of expected range: Red Green Blue

    Details

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

      Description

      When rendering the provided PDF file the following exception is thrown and the PDF does not render:

      WARNING: Error parsing content stream.
      java.lang.IllegalArgumentException: Color parameter outside of expected range: Red Green Blue
      at java.awt.Color.testColorValueRange(Color.java:344)
      at java.awt.Color.<init>(Color.java:462)
      at org.icepdf.core.util.content.AbstractContentParser.consume_g(AbstractContentParser.java:185)
      at org.icepdf.core.util.content.NContentParser.parse(Unknown Source)
      at org.icepdf.core.pobjects.Page.init(Page.java:390)
      at org.icepdf.ri.common.views.PageViewComponentImpl$PageInitializer.run(PageViewComponentImpl.java:1152)
      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)

        Activity

        Arran Mccullough created issue -
        Patrick Corless made changes -
        Field Original Value New Value
        Fix Version/s 5.1.2 [ 11872 ]
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #44125 Thu Feb 26 15:01:57 MST 2015 patrick.corless PDF-850 added code protection for mailformed negative gray values.
        Files Changed
        Commit graph MODIFY /icepdf/branches/icepdf-5.0.1/icepdf/core/src/org/icepdf/core/util/content/AbstractContentParser.java
        Hide
        Patrick Corless added a comment -

        The PDF in question has gray colour value that is outside the expected range of 0->1.0. The value is actually -0.04 which is likely an issue with the PDF encoder.

        Touched up the to protected against negative values.

        Show
        Patrick Corless added a comment - The PDF in question has gray colour value that is outside the expected range of 0->1.0. The value is actually -0.04 which is likely an issue with the PDF encoder. Touched up the to protected against negative values.
        Hide
        Patrick Corless added a comment -

        Added code protection, PDF renders correct. Marking as resolved.

        Show
        Patrick Corless added a comment - Added code protection, PDF renders correct. Marking as resolved.
        Patrick Corless made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #44137 Mon Mar 02 10:02:53 MST 2015 patrick.corless PDF-850 added colour length check for the corner case of length one.
        Files Changed
        Commit graph MODIFY /icepdf/branches/icepdf-5.0.1/icepdf/core/src/org/icepdf/core/pobjects/graphics/ICCBased.java
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #44141 Mon Mar 02 12:26:19 MST 2015 patrick.corless PDF-850 reverting colour length check for the corner case of length one.
        Files Changed
        Commit graph MODIFY /icepdf/branches/icepdf-5.0.1/icepdf/core/src/org/icepdf/core/pobjects/graphics/ICCBased.java
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #44156 Tue Mar 03 10:10:07 MST 2015 patrick.corless PDF-850 added code protection for mailformed negative gray values.
        Files Changed
        Commit graph MODIFY /icepdf/trunk/icepdf/core/src/org/icepdf/core/util/content/AbstractContentParser.java
        Patrick Corless made changes -
        Status Resolved [ 5 ] Closed [ 6 ]

          People

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

            Dates

            • Created:
              Updated:
              Resolved: