CreateCaret

PdfContentEditor.CreateCaret method

创建插入符号注释。

public void CreateCaret(int page, Rectangle annotRect, Rectangle caretRect, string symbol, 
    string annotContents, Color color)
范围类型描述
pageInt32将在其中创建注释的原始页数。
annotRectRectangle定义页面上注释位置的注释矩形。
caretRectRectangle底层插入符号的实际边界。
symbolString符号将与插入符号相关联。值可以是:“P”(段落)、“无”。
annotContentsString注释的内容。
colorColor注释的颜色。

例子

PdfContentEditor editor = new PdfContentEditor();
editor.BindPdf("example.pdf");
editor.CreateCaret(1,
    new System.Drawing.Rectangle(50, 50, 100, 100),
    new System.Drawing.Rectangle(60, 60, 70, 70),
    "None", "Welcome to Aspose", System.Drawing.Color.Red);
editor.Save("example_out.pdf");

也可以看看