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

java.lang.IllegalArgumentException: negative dash phase

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 1.8.6, 1.8.7, 2.0.0
    • 1.8.7, 2.0.0
    • Parsing
    • None

    Description

      I get this exception with the attached file:

      java.lang.IllegalArgumentException: negative dash phase
              at java.awt.BasicStroke.<init>(Unknown Source)
              at org.apache.pdfbox.rendering.PageDrawer.getStroke(PageDrawer.java:691)
              at org.apache.pdfbox.rendering.PageDrawer.strokePath(PageDrawer.java:707)
              at org.apache.pdfbox.util.operator.graphics.StrokePath.process(StrokePath.java:36)
              at org.apache.pdfbox.util.PDFStreamEngine.processOperator(PDFStreamEngine.java:564)
      

      The reason is this:

      [2.88 2.88 2.88 2.88 2.88 2.88 2.88 2.88 ]-2407.142 d
      

      It doesn't make sense to have a negative dash phase start, so I will adjust negative numbers to 0 and put out a warning.

      Attachments

        1. PDFBOX-2243-050659.pdf
          24 kB
          Tilman Hausherr

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved: