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

ERROR: dash lengths all zero, ignored

    XMLWordPrintableJSON

Details

    • Wish
    • Status: Closed
    • Trivial
    • Resolution: Fixed
    • 2.0.2, 2.0.3, 3.0.0 PDFBox
    • 2.0.3, 3.0.0 PDFBox
    • Parsing

    Description

      On Friday our production log system alerted us that we had an error ("dash lengths all zero, ignored"). We investigated and found that the PDF processed gave an error when opening it up in Adobe Reader as well but the page looked fine and was processed fine as well. But still we got this error. For us this is a false positive, even though a line pattern should not be empty the page isn't broken or can't be viewed so why handle it as an error.

      My suggestion is to handle the errors in the code below as an information logging or warning.

      In our case we got an update 1 hour later with a PDF that didn't have the empty line dash pattern.

      SetLineDashPattern.java
              for (COSBase base : dashArray)
              {
                  if (base instanceof COSNumber)
                  {
                      COSNumber num = (COSNumber) base;
                      if (num.floatValue() != 0)
                      {
                          allZero = false;
                          break;
                      }
                  }
                  else
                  {
                      LOG.error("dash array has non number element " + base + ", ignored");
                      dashArray = new COSArray();
                      break;
                  }
              }
              if (dashArray.size() > 0 && allZero)
              {
                  LOG.error("dash lengths all zero, ignored");
                  dashArray = new COSArray();
              }
      

      Attachments

        Activity

          People

            tilman Tilman Hausherr
            kalaspuffar Daniel Persson
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Time Tracking

                Estimated:
                Original Estimate - 10m
                10m
                Remaining:
                Remaining Estimate - 10m
                10m
                Logged:
                Time Spent - Not Specified
                Not Specified