/** * Convenience method for annotations: sets the line with and dash style. * * @param lineWidth The line width. * @param bs The border style, may be null. * @param border The border array, must have at least three entries. This is * only used if the border style is null. * * @throws IOException If there is an error writing to the content stream. */ public void setBorderLine(float lineWidth, PDBorderStyleDictionary bs, COSArray border) throws IOException { // Can't use PDBorderStyleDictionary.getDashStyle() as // this will return a default dash style if non is existing if (bs != null && bs.getCOSObject().containsKey(COSName.D) && bs.getStyle().equals(PDBorderStyleDictionary.STYLE_DASHED)) { setLineDashPattern(bs.getDashStyle().getDashArray(), 0); } else if (bs == null && border.size() > 3 && border.getObject(3) instanceof COSArray) { setLineDashPattern(((COSArray) border.getObject(3)).toFloatArray(), 0); } setLineWidthOnDemand(lineWidth); }
annotation.getBorderStyle().getStyle().equals(PDBorderStyleDictionary.STYLE_UNDERLINE))