ICEpdf
  1. ICEpdf
  2. PDF-467

Gradient paint does not support buffered image modes other than RGB

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Critical Critical
    • Resolution: Fixed
    • Affects Version/s: 4.3.3
    • Fix Version/s: 4.3.4
    • Component/s: Core/Parsing
    • Labels:
      None
    • Environment:
      any

      Description

      A client has reported that they are having difficulty converting a few documents to image. During the capture process the user is allowed to pick one of the following capture type colour modes for the resulting buffered image:

      // type is a given method-parameter - the user can define the ImageType
              // possible values:
              // - BufferedImage.TYPE_BYTE_GRAY
              // - BufferedImage.TYPE_BYTE_BINARY
              // - BufferedImage.TYPE_INT_RGB

      There is a logo in the document in question that contains a gradient. If the buffered image type is gray or binary the batik library we use for pattern paint will fail. It should be relatively straight foward to catch the exception and use a solid fill instead of the gradient paint. A check for a newer version of the pattern pain class would also be another good idea.

        Activity

        Patrick Corless created issue -
        Patrick Corless made changes -
        Field Original Value New Value
        Salesforce Case []
        Priority Major [ 3 ] Critical [ 2 ]
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #30787 Mon Sep 10 12:54:34 MDT 2012 patrick.corless PDF-467 addition of ColorSpace.CS_GRAY to the multiple gradient paint class so that we can do captures to gray scale buffered images.
        Files Changed
        Commit graph MODIFY /icepdf/trunk/icepdf/core/src/org/icepdf/core/pobjects/graphics/batik/ext/awt/MultipleGradientPaintContext.java
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #30788 Mon Sep 10 13:02:14 MDT 2012 patrick.corless PDF-467 addition of ColorSpace.CS_GRAY to the multiple gradient paint class so that we can do captures to gray scale buffered images.
        Files Changed
        Commit graph MODIFY /icepdf/branches/icepdf-4.3.3/icepdf
        Commit graph MODIFY /icepdf/branches/icepdf-4.3.3/icepdf/core/src/org/icepdf/core/pobjects/graphics/batik/ext/awt/MultipleGradientPaintContext.java
        Hide
        Patrick Corless added a comment -

        Updated the MultipleGradientPaintContext class to support Gray colour space model. This fixes the unsupported exception that was being through. The PDF content stream now renders correctly when doing a page capture to a buffered image of type TYPE_BYTE_GRAY.

        Show
        Patrick Corless added a comment - Updated the MultipleGradientPaintContext class to support Gray colour space model. This fixes the unsupported exception that was being through. The PDF content stream now renders correctly when doing a page capture to a buffered image of type TYPE_BYTE_GRAY.
        Patrick Corless made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #31429 Thu Oct 11 14:58:38 MDT 2012 patrick.corless PDF-467 fixed an incorrect assignment of dataModel = graybmodel_A when detected.
        Files Changed
        Commit graph MODIFY /icepdf/branches/icepdf-4.3.3/icepdf/core/src/org/icepdf/core/pobjects/graphics/batik/ext/awt/MultipleGradientPaintContext.java
        Patrick Corless made changes -
        Status Resolved [ 5 ] Closed [ 6 ]

          People

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

            Dates

            • Created:
              Updated:
              Resolved: