我是新来的itext,我无法让我的注释图标正确显示。无法使itext矩形与注释一起正常工作
我正在尝试为我的注释图标创建一个矩形。我的例子如下:
Rectangle rect = new Rectangle(164, 190, 164, 110);
chunk_text.setAnnotation(PdfAnnotation.createText(writer, rect, "Warning", comments, false, "Comment"));
PdfContentByte pdb = new PdfContentByte(writer);
chunk_free.setAnnotation(PdfAnnotation.createFreeText(writer, rect, comments, pdb));
chunk_popup.setAnnotation(PdfAnnotation.createPopup(writer, rect, comments, false));
但是,图标未能出现或只是PDF中的一个小点。
我无法找到我做错了什么。
它做同样的事情 – TYD
如果我做writer.addAnnotation一个弹出式注释
popup
,似乎什么都没有。我必须使用大块出现。 – TYD@TYD *“如果我这样做了writer.addAnnotation,什么都不会显示”* - 在编辑我的答案之前,我使用'writer.addAnnotation'进行了测试,它工作正常。因此,你做了超出你告诉我们的错误。 – mkl