3

我似乎无法删除矩形上的边框!请参阅下面的代码,我正在使用 PDFannotation 创建一个链接。链接都有效,但每个矩形都有一个边框。

PdfAnnotation annotation;
Rectangle rect = new Rectangle(xOffset, yOffset, xOffset + tab.getScaledWidth(),      yOffset+tab.getScaledHeight());

rect.setBorder(Rectangle.NO_BORDER);

annotation = PdfAnnotation.createLink(writer, rect, PdfAnnotation.HIGHLIGHT_NONE,      PdfAction.gotoLocalPage(section.GetStartPageIndex() + 1,destination, writer));

stamper.addAnnotation(annotation,i);
4

2 回答 2

4

我已经意识到这是有边框的注释,删除使用

annotation.setBorder(new PdfBorderArray(0f, 0f, 0f));
于 2013-02-19T21:07:18.450 回答
0

Or you can use:

annotation.BorderStyle = new PdfBorderDictionary(0f, 0);
于 2014-03-27T00:24:42.863 回答