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

code has bug

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.0.4
    • 2.0.7, 3.0.0 PDFBox
    • None
    • None

    Description

      in org.apache.pdfbox.rendering.PageDrawer.java

      // return border info. BorderStyle must be provided as parameter because
      // method is not available in the base class
      private AnnotationBorder getAnnotationBorder(PDAnnotation annotation,
      PDBorderStyleDictionary borderStyle)
      {
      AnnotationBorder ab = new AnnotationBorder();

      COSArray border = annotation.getBorder();
      if (borderStyle == null)
      {
      // this code may throw NullPointerException
      if (border.get(2) instanceof COSNumber)

      { ab.width = ((COSNumber) border.getObject(2)).floatValue(); }

      if (border.size() > 3)
      {
      COSBase base3 = border.getObject(3);
      if (base3 instanceof COSArray)

      { ab.dashArray = ((COSArray) base3).toFloatArray(); }

      }
      }

      i can not find the pdf file that has this promble.

      Attachments

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved: