PdfLineAnnotation extends PdfMarkupAnnotation { public PdfLineAnnotation setDashPattern(PdfArray dashPattern) { return setBorderStyle(BorderStyleUtil.setDashPattern(getBorderStyle(), dashPattern)); } PdfLineAnnotation(Rectangle rect, float[] line); protected  PdfLineAnnotation(PdfDictionary pdfObject); @Override PdfName getSubtype(); PdfArray getLine(); PdfDictionary getBorderStyle(); PdfLineAnnotation setBorderStyle(PdfDictionary borderStyle); PdfLineAnnotation setBorderStyle(PdfName style); PdfLineAnnotation setDashPattern(PdfArray dashPattern); PdfArray getLineEndingStyles(); PdfLineAnnotation setLineEndingStyles(PdfArray lineEndingStyles); Color getInteriorColor(); PdfLineAnnotation setInteriorColor(PdfArray interiorColor); PdfLineAnnotation setInteriorColor(float[] interiorColor); float getLeaderLineLength(); PdfLineAnnotation setLeaderLineLength(float leaderLineLength); float getLeaderLineExtension(); PdfLineAnnotation setLeaderLineExtension(float leaderLineExtension); float getLeaderLineOffset(); PdfLineAnnotation setLeaderLineOffset(float leaderLineOffset); boolean getContentsAsCaption(); PdfLineAnnotation setContentsAsCaption(boolean contentsAsCaption); PdfName getCaptionPosition(); PdfLineAnnotation setCaptionPosition(PdfName captionPosition); PdfDictionary getMeasure(); PdfLineAnnotation setMeasure(PdfDictionary measure); PdfArray getCaptionOffset(); PdfLineAnnotation setCaptionOffset(PdfArray captionOffset); PdfLineAnnotation setCaptionOffset(float[] captionOffset);  }
@Test public void setDashPatternTest() { PdfLineAnnotation pdfLineAnnotation = new PdfLineAnnotation(new PdfDictionary()); PdfArray array = new PdfArray(new float[]{1, 2}); pdfLineAnnotation.setDashPattern(array); Assert.assertArrayEquals(array.toFloatArray(), pdfLineAnnotation.getBorderStyle().getAsArray(PdfName.D).toFloatArray(), FLOAT_EPSILON_COMPARISON); }