使用PDF Clown构建文本标注

时间:2016-08-05 11:04:05

标签: java adobe pdfclown

adobe acrobat reader有标记工具,名为"文本标注"。

可以用PDF Clown构建这种类型的对象吗?

1 个答案:

答案 0 :(得分:0)

OP提供的示例看起来非常像带有StaticNote的PDF Clown StaticNote.CalloutLine

来自AnnotationSample PDF Clown cli示例的相关代码是:

// Callout.
composer.showText("Callout note annotation:", new Point(35, 85));
new StaticNote(
  page,
  new Rectangle(250, 90, 150, 70),
  "Text of the Callout note annotation"
  ).withLine(
     new StaticNote.CalloutLine(
       page,
       new Point(250,125),
       new Point(150,125),
       new Point(100,100)
       )
     )
   .withLineEndStyle(LineEndStyleEnum.OpenArrow)
   .withBorder(new Border(1))
   .withColor(DeviceRGBColor.get(Color.YELLOW));

(来自answer here.

输出:

AnnotationSample.java