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

java.lang.IllegalArgumentException: alpha value out of range

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.0.0
    • Fix Version/s: 2.0.0
    • Component/s: Rendering
    • Labels:
      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

          Issue Links

            Activity

              People

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

                Dates

                • Created:
                  Updated:
                  Resolved: