PdfContentEditor.CreateCaret

PdfContentEditor.CreateCaret method

Creates caret annotation.

public void CreateCaret(int page, Rectangle annotRect, Rectangle caretRect, string symbol, 
    string annotContents, Color color)
ParameterTypeDescription
pageInt32The number of original page where the annotation will be created.
annotRectRectangleThe annotation rectangle defining the location of the annotation on the page.
caretRectRectangleThe actual boundaries of the underlying caret.
symbolStringA symbol will be associated with the caret. Value can be: “P” (Paragraph), “None”.
annotContentsStringThe contents of the annotation.
colorColorThe color of the annotation.

Examples

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");

See Also