我添加了一个pdf链接,带有lowagie itext 2.0.8。当我点击链接时,它正在工作,但它会在同一页面中打开它。我想在新页面中打开它,但我无法找到该怎么做。有没有办法用itext做?
PdfAction action = new PdfAction(uri);
//uri like http://stackoverflow.com/questions/ask
com.lowagie.text.Rectangle targetArea = checkLinkArea(c, box);
if (targetArea == null) {
return;
}
PdfAnnotation annot = PdfAnnotation.createLink(
_writer, targetArea, PdfAnnotation.HIGHLIGHT_INVERT, action);
annot.setBorderStyle(new PdfBorderDictionary(0.0f, 0));
_writer.addAnnotation(annot);