iText矩形 - 无法删除边框 [英] iText rectangle - can't remove border
本文介绍了iText矩形 - 无法删除边框的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我似乎无法删除矩形上的边框!请参阅下面的代码,我正在使用PDF注释创建链接。链接全部工作,但每个矩形都有一个边框。
I can't seem to remove the border on a rectangle! See code below, I am creating a link using a PDFannotation. The links all work but each rectangle has a border.
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);
推荐答案
我意识到这是带边框的注释,删除使用
I've realised it's the annotation which has the border, to remove use
annotation.setBorder(new PdfBorderArray(0f, 0f, 0f));
这篇关于iText矩形 - 无法删除边框的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文