Uploaded image for project: 'PDFBox'
  1. PDFBox
  2. PDFBOX-2203

java.lang.IllegalArgumentException: alpha value out of range

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.0.0
    • 2.0.0
    • Rendering
    • None

    Description

      I get this with the attached file:

      java.lang.IllegalArgumentException: alpha value out of range
      	at java.awt.AlphaComposite.<init>(AlphaComposite.java:624)
      	at java.awt.AlphaComposite.getInstance(AlphaComposite.java:689)
      	at org.apache.pdfbox.pdmodel.graphics.blend.BlendComposite.getInstance(BlendComposite.java:45)
      	at org.apache.pdfbox.pdmodel.graphics.state.PDGraphicsState.getStrokeJavaComposite(PDGraphicsState.java:577)
      	at org.apache.pdfbox.rendering.PageDrawer.strokePath(PageDrawer.java:939)
      	at org.apache.pdfbox.util.operator.pagedrawer.StrokePath.process(StrokePath.java:37)
      

      The file has a CA and ca of 1.005 in ExtGState which is incorrect.
      I will fix this by clipping the alphaConstant to a 0..1 interval and put out a warning.

      Attachments

        1. PDFBOX-2203-019672.pdf
          229 kB
          Tilman Hausherr

        Issue Links

          Activity

            People

              tilman Tilman Hausherr
              tilman Tilman Hausherr
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: