alexa

    Show / Hide Table of Contents

    Class PdfRedactionAnnotation

    Represents the PdfRedactionAnnotation.

    Inheritance
    System.Object
    PdfAnnotation
    PdfRedactionAnnotation
    Implements
    System.ComponentModel.INotifyPropertyChanged
    Inherited Members
    PdfAnnotation.AnnotationFlags
    PdfAnnotation.Author
    PdfAnnotation.Bounds
    PdfAnnotation.CalculateBounds(RectangleF, PdfPage, PdfLoadedPage)
    PdfAnnotation.CalculateTemplateBounds(RectangleF, PdfPageBase, PdfTemplate)
    PdfAnnotation.CalculateTemplateBounds(RectangleF, PdfPageBase, PdfTemplate, Boolean)
    PdfAnnotation.CalculateTemplateBounds(RectangleF, PdfPageBase, PdfTemplate, Boolean, PdfGraphics)
    PdfAnnotation.CheckFlatten()
    PdfAnnotation.Color
    PdfAnnotation.FlattenPopUps
    PdfAnnotation.InnerColor
    PdfAnnotation.Layer
    PdfAnnotation.Location
    PdfAnnotation.ModifiedDate
    PdfAnnotation.Name
    PdfAnnotation.Opacity
    PdfAnnotation.Page
    PdfAnnotation.PdfTag
    PdfAnnotation.PropertyChanged
    PdfAnnotation.Rotate
    PdfAnnotation.SetAppearance(Boolean)
    PdfAnnotation.SetValues(String, String)
    PdfAnnotation.Size
    PdfAnnotation.Subject
    PdfAnnotation.Text
    System.Object.Equals(System.Object)
    System.Object.Equals(System.Object, System.Object)
    System.Object.GetHashCode()
    System.Object.GetType()
    System.Object.MemberwiseClone()
    System.Object.ReferenceEquals(System.Object, System.Object)
    System.Object.ToString()
    Namespace: Syncfusion.Pdf.Interactive
    Assembly: Syncfusion.Pdf.Base.dll
    Syntax
    public class PdfRedactionAnnotation : PdfAnnotation, IPdfWrapper, INotifyPropertyChanged
    Examples
    //Create a new PDF document.
    PdfDocument doc = new PdfDocument();
    //Create a new page.
    PdfPage page = doc.Pages.Add();
    //Creates a new Redaction annotation.
    PdfRedactionAnnotation annot = new PdfRedactionAnnotation();
    //set the bounds
    annot.Bounds = new Rectangle(100, 120, 100, 100);
    //set the innercolor
    annot.InnerColor = Color.Aqua;
    //set the bordercolor
    annot.BorderColor = Color.Orange;
    //set the textcolor
    annot.TextColor = Color.Yellow;
    //set the font
    annot.Font = new PdfStandardFont(PdfFontFamily.Helvetica, 10);
    //set overlaytext
    annot.OverlayText = "Redact";
    //set textalignment
    annot.TextAlignment = PdfTextAlignment.Right; 
    annot.Repeat = true;
    annot.SetAppearance(true);
    ////Add the annotation to the page.
    page.Annotations.Add(annot);
    //Saves the document to disk.
    doc.Save("empty.pdf");
    doc.Close(true);
    System.Diagnostics.Process.Start("empty.pdf");
     //Create a new PDF document.
    Dim doc As PdfDocument = New PdfDocument()
    //Create a new page.
    Dim page As PdfPage = doc.Pages.Add()
    //Creates a new Redaction annotation.
    Dim annot As PdfRedactionAnnotation = New PdfRedactionAnnotation()
    //set the bounds
    annot.Bounds = New Rectangle(100, 120, 100, 100)
    //set the innercolor
    annot.InnerColor = Color.Aqua
    //set the bordercolor
    annot.BorderColor = Color.Orange
    //set the textcolor
    annot.TextColor = Color.Yellow
    annot.Font = New PdfStandardFont(PdfFontFamily.Helvetica, 10)
    annot.OverlayText = "Redact"
    annot.TextAlignment = PdfTextAlignment.Right
    annot.Repeat = True
    annot.SetAppearance(True)
    page.Annotations.Add(annot)
    //Saves the document to disk.
    doc.Save("empty.pdf")
    doc.Close(True)
    System.Diagnostics.Process.Start("empty.pdf");

    Constructors

    PdfRedactionAnnotation()

    Initialize the new instance of the redaction annotation.

    Declaration
    public PdfRedactionAnnotation()

    Properties

    AppearanceFillColor

    Get or set the appearance fill color of the redaction annotation.

    Declaration
    public PdfColor AppearanceFillColor { get; set; }
    Property Value
    Type Description
    PdfColor

    Returns a PdfColor representing the fill color used for the appearance of the redaction annotation.

    Examples
    //Create a new PDF document.
    PdfLoadedDocument doc = new PdfLoadedDocument(@"..\..\Annotations.pdf");
    PdfLoadedPage page = doc.Pages[0] as PdfLoadedPage;
    //Creates a new Redaction annotation.
    PdfRedactionAnnotation annot = new PdfRedactionAnnotation();
    //set the bounds
    annot.Bounds = new Rectangle(100, 120, 100, 100);
    //set the innercolor
    annot.InnerColor = Color.Aqua;
    //set the bordercolor
    annot.BorderColor = Color.Orange;
    //set the textcolor
    annot.TextColor = Color.Yellow;
    //set the appearancefillcolor
    annot.AppearanceFillColor = Color.HotPink;
    //set the font
    annot.Font = new PdfStandardFont(PdfFontFamily.Helvetica, 10);
    //set overlaytext
    annot.OverlayText = "Redact";
    //set textalignment
    annot.TextAlignment = PdfTextAlignment.Right; 
    annot.Repeat = true;
    annot.SetAppearance(true);
    ////Add the annotation to the page.
    page.Annotations.Add(annot);
    //Saves the document to disk.
    doc.Save("empty.pdf");
    doc.Close(true);
    System.Diagnostics.Process.Start("empty.pdf");
     //Create a new PDF document.
    Dim doc As PdfDocument = New PdfDocument()
    //Create a new page.
    Dim page As PdfPage = doc.Pages.Add()
    //Creates a new Redaction annotation.
    Dim annot As PdfRedactionAnnotation = New PdfRedactionAnnotation()
    //set the bounds
    annot.Bounds = New Rectangle(100, 120, 100, 100)
    //set the innercolor
    annot.InnerColor = Color.Aqua
    //set the bordercolor
    annot.BorderColor = Color.Orange
    //set the textcolor
    annot.TextColor = Color.Yellow
    //set the appearancefillcolor
    annot.AppearanceFillColor = Color.HotPink;
    annot.Font = New PdfStandardFont(PdfFontFamily.Helvetica, 10)
    annot.OverlayText = "Redact"
    annot.TextAlignment = PdfTextAlignment.Right
    annot.Repeat = True
    annot.SetAppearance(True)
    page.Annotations.Add(annot)
    //Saves the document to disk.
    doc.Save("empty.pdf")
    doc.Close(True)
    System.Diagnostics.Process.Start("empty.pdf");

    Border

    Get or set the border of redaction annotation

    Declaration
    public LineBorder Border { get; set; }
    Property Value
    Type
    LineBorder
    Examples
    //Create a new PDF document.
    PdfDocument doc = new PdfDocument();
    //Create a new page.
    PdfPage page = doc.Pages.Add();
    //Creates a new Redaction annotation.
    PdfRedactionAnnotation annot = new PdfRedactionAnnotation();
    //set the bounds
    annot.Bounds = new Rectangle(100, 120, 100, 100);
    //set the innercolor
    annot.InnerColor = Color.Aqua;
    //set the bordercolor
    annot.BorderColor = Color.Orange;
    //set the textcolor
    annot.TextColor = Color.Yellow;
    //set the font
    annot.Font = new PdfStandardFont(PdfFontFamily.Helvetica, 10);
    //set overlaytext
    annot.OverlayText = "Redact";
    //set textalignment
    annot.TextAlignment = PdfTextAlignment.Right; 
    annot.Repeat = true;
    annot.SetAppearance(true);
    ////Add the annotation to the page.
    page.Annotations.Add(annot);
    //Saves the document to disk.
    doc.Save("empty.pdf");
    doc.Close(true);
    System.Diagnostics.Process.Start("empty.pdf");
     //Create a new PDF document.
    Dim doc As PdfDocument = New PdfDocument()
    //Create a new page.
    Dim page As PdfPage = doc.Pages.Add()
    //Creates a new Redaction annotation.
    Dim annot As PdfRedactionAnnotation = New PdfRedactionAnnotation()
    //set the bounds
    annot.Bounds = New Rectangle(100, 120, 100, 100)
    //set the innercolor
    annot.InnerColor = Color.Aqua
    //set the bordercolor
    annot.BorderColor = Color.Orange
    //set the textcolor
    annot.TextColor = Color.Yellow
    annot.Font = New PdfStandardFont(PdfFontFamily.Helvetica, 10)
    annot.OverlayText = "Redact"
    annot.TextAlignment = PdfTextAlignment.Right
    annot.Repeat = True
    annot.SetAppearance(True)
    page.Annotations.Add(annot)
    //Saves the document to disk.
    doc.Save("empty.pdf")
    doc.Close(True)
    System.Diagnostics.Process.Start("empty.pdf");

    BorderColor

    Get or set the bordercolor of redaction annotation

    Declaration
    public PdfColor BorderColor { get; set; }
    Property Value
    Type
    PdfColor
    Examples
    //Create a new PDF document.
    PdfDocument doc = new PdfDocument();
    //Create a new page.
    PdfPage page = doc.Pages.Add();
    //Creates a new Redaction annotation.
    PdfRedactionAnnotation annot = new PdfRedactionAnnotation();
    //set the bounds
    annot.Bounds = new Rectangle(100, 120, 100, 100);
    //set the innercolor
    annot.InnerColor = Color.Aqua;
    //set the bordercolor
    annot.BorderColor = Color.Orange;
    //set the textcolor
    annot.TextColor = Color.Yellow;
    //set the font
    annot.Font = new PdfStandardFont(PdfFontFamily.Helvetica, 10);
    //set overlaytext
    annot.OverlayText = "Redact";
    //set textalignment
    annot.TextAlignment = PdfTextAlignment.Right; 
    annot.Repeat = true;
    annot.SetAppearance(true);
    ////Add the annotation to the page.
    page.Annotations.Add(annot);
    //Saves the document to disk.
    doc.Save("empty.pdf");
    doc.Close(true);
    System.Diagnostics.Process.Start("empty.pdf");
     //Create a new PDF document.
    Dim doc As PdfDocument = New PdfDocument()
    //Create a new page.
    Dim page As PdfPage = doc.Pages.Add()
    //Creates a new Redaction annotation.
    Dim annot As PdfRedactionAnnotation = New PdfRedactionAnnotation()
    //set the bounds
    annot.Bounds = New Rectangle(100, 120, 100, 100)
    //set the innercolor
    annot.InnerColor = Color.Aqua
    //set the bordercolor
    annot.BorderColor = Color.Orange
    //set the textcolor
    annot.TextColor = Color.Yellow
    annot.Font = New PdfStandardFont(PdfFontFamily.Helvetica, 10)
    annot.OverlayText = "Redact"
    annot.TextAlignment = PdfTextAlignment.Right
    annot.Repeat = True
    annot.SetAppearance(True)
    page.Annotations.Add(annot)
    //Saves the document to disk.
    doc.Save("empty.pdf")
    doc.Close(True)
    System.Diagnostics.Process.Start("empty.pdf");

    BoundsCollection

    Gets or sets bound collection of redaction annotation.

    Declaration
    public List<RectangleF> BoundsCollection { get; set; }
    Property Value
    Type
    System.Collections.Generic.List<System.Drawing.RectangleF>
    Examples
    //Create a new PDF document.
    PdfDocument doc = new PdfDocument();
    //Create a new page.
    PdfPage page = doc.Pages.Add();
    //Creates a new Redaction annotation.
    PdfRedactionAnnotation annot = new PdfRedactionAnnotation();
    //set the bounds
    List<RectangleF> bounds = new List<RectangleF>();
    bounds.Add(new RectangleF(100, 100, 50, 20));
    bounds.Add(new RectangleF(200, 150, 60, 25));
    annot.BoundsCollection = bounds;
    //set the Inner color
    annot.InnerColor = Color.Black;
    //set the Border color
    annot.BorderColor = Color.Green;
    //set the Text color
    annot.TextColor = Color.Yellow;
    //set the font
    annot.Font = new PdfStandardFont(PdfFontFamily.Helvetica, 10);
    //set Overlay text
    annot.OverlayText = "Redact";
    //set Text alignment
    annot.TextAlignment = PdfTextAlignment.Center;
    annot.RepeatText = true;
    annot.SetAppearance(true);
    //Add the annotation to the page.
    page.Annotations.Add(annot);
    //Saves the document to disk.
    doc.Save("RedactionWithQuadPoints.pdf");
    doc.Close(true);
    'Create a new PDF document.
    Dim doc As PdfDocument = New PdfDocument()
    'Create a new page.
    Dim page As PdfPage = doc.Pages.Add()
    'Creates a new Redaction annotation.
    Dim annot As PdfRedactionAnnotation = New PdfRedactionAnnotation()
    'set the bounds
    Dim bounds As List(Of RectangleF) = New List(Of RectangleF)()
    bounds.Add(New RectangleF(100, 100, 50, 20))
    bounds.Add(New RectangleF(200, 150, 60, 25))
    annot.BoundsCollection = bounds
    'set the Inner color
    annot.InnerColor = Color.Black
    'set the Border color
    annot.BorderColor = Color.Green
    'set the Text color
    annot.TextColor = Color.Yellow
    'set the font
    annot.Font = New PdfStandardFont(PdfFontFamily.Helvetica, 10)
    'set Overlay text
    annot.OverlayText = "Redact"
    'set Text alignment
    annot.TextAlignment = PdfTextAlignment.Center
    annot.RepeatText = True
    annot.SetAppearance(True)
    'Add the annotation to the page.
    page.Annotations.Add(annot)
    'Saves the document to disk.
    doc.Save("RedactionWithQuadPoints.pdf")
    doc.Close(True)

    Comments

    Gets the annotation comments

    Declaration
    public PdfPopupAnnotationCollection Comments { get; }
    Property Value
    Type Description
    PdfPopupAnnotationCollection

    Returns a PdfPopupAnnotationCollection containing the comments associated with the annotation.

    Examples
    // Create a new PDF document.
    PdfDocument document = new PdfDocument();
    // Create a new page.
    PdfPage page = document.Pages.Add();
    // Create a new pdf redaction annotation.
    PdfRedactionAnnotation redactionAnnotation = new PdfRedactionAnnotation();
    redactionAnnotation.Bounds = new Rectangle(100, 120, 100, 100);
    redactionAnnotation.InnerColor = new PdfColor(Color.Red);
    redactionAnnotation.TextColor = new PdfColor(Color.Black);
    redactionAnnotation.Font = new PdfStandardFont(PdfFontFamily.Helvetica, 10);
    redactionAnnotation.OverlayText = "Text Redaction Annotation";
    redactionAnnotation.TextAlignment = PdfTextAlignment.Center;
    redactionAnnotation.RepeatText = true;
    // Add a popup annotation for comments.
    PdfPopupAnnotation popupComments = new PdfPopupAnnotation();
    popupComments.Author = "TestAuthor";
    popupComments.Text = "Test Text";
    redactionAnnotation.Comments.Add(popupComments);
    // Get annotation comments.
    PdfPopupAnnotationCollection commentsCollection = redactionAnnotation.Comments;
    // Save the document to disk.
    document.Save("Output.pdf");
    document.Close(true);
    Dim document As PdfDocument = New PdfDocument
    Dim page As PdfPage = document.Pages.Add
    Dim redactionAnnotation As PdfRedactionAnnotation = New PdfRedactionAnnotation()
    redactionAnnotation.Bounds = New Rectangle(100, 120, 100, 100)
    redactionAnnotation.InnerColor = Color.Black	
    redactionAnnotation.BorderColor = Color.Yellow
    redactionAnnotation.TextColor = Color.Blue
    redactionAnnotation.Font = New PdfStandardFont(PdfFontFamily.Helvetica, 10)
    redactionAnnotation.OverlayText = "Text Redaction Annotation"
    redactionAnnotation.TextAlignment = PdfTextAlignment.Right
    redactionAnnotation.RepeatText = True
    Dim popupComments As PdfPopupAnnotation = New PdfPopupAnnotation
    popupComments.Author = "TestAuthor"
    popupComments.Text = "Test Text"
    redactionAnnotation.Comments.Add(popupComments)
    Dim commentsCollection As PdfPopupAnnotationCollection = redactionAnnotation.Comments
    ' Save the document to disk.
    document.Save("Output.pdf")
    document.Close(true)

    Flatten

    Get or set flatten of redaction annotation

    Declaration
    public bool Flatten { get; set; }
    Property Value
    Type
    System.Boolean
    Examples
    //Create a new PDF document.
    PdfDocument doc = new PdfDocument();
    //Create a new page.
    PdfPage page = doc.Pages.Add();
    //Creates a new Redaction annotation.
    PdfRedactionAnnotation annot = new PdfRedactionAnnotation();
    //set the bounds
    annot.Bounds = new Rectangle(100, 120, 100, 100);
    //set the innercolor
    annot.InnerColor = Color.Aqua;
    //set the bordercolor
    annot.BorderColor = Color.Orange;
    //set the textcolor
    annot.TextColor = Color.Yellow;
    //set the font
    annot.Font = new PdfStandardFont(PdfFontFamily.Helvetica, 10);
    //set overlaytext
    annot.OverlayText = "Redact";
    //set textalignment
    annot.TextAlignment = PdfTextAlignment.Right; 
    annot.Repeat = true;
    annot.Flatten=true;
    ////Add the annotation to the page.
    page.Annotations.Add(annot);
    //Saves the document to disk.
    doc.Save("empty.pdf");
    doc.Close(true);
    System.Diagnostics.Process.Start("empty.pdf");
     //Create a new PDF document.
    Dim doc As PdfDocument = New PdfDocument()
    //Create a new page.
    Dim page As PdfPage = doc.Pages.Add()
    //Creates a new Redaction annotation.
    Dim annot As PdfRedactionAnnotation = New PdfRedactionAnnotation()
    //set the bounds
    annot.Bounds = New Rectangle(100, 120, 100, 100)
    //set the innercolor
    annot.InnerColor = Color.Aqua
    //set the bordercolor
    annot.BorderColor = Color.Orange
    //set the textcolor
    annot.TextColor = Color.Yellow
    annot.Font = New PdfStandardFont(PdfFontFamily.Helvetica, 10)
    annot.OverlayText = "Redact"
    annot.TextAlignment = PdfTextAlignment.Right
    annot.Repeat = True
    annot.Flatten=true;
    page.Annotations.Add(annot)
    //Saves the document to disk.
    doc.Save("empty.pdf")
    doc.Close(True)
    System.Diagnostics.Process.Start("empty.pdf");

    Font

    Get or set the font of redaction annotation

    Declaration
    public PdfFont Font { get; set; }
    Property Value
    Type
    PdfFont
    Examples
    //Create a new PDF document.
    PdfDocument doc = new PdfDocument();
    //Create a new page.
    PdfPage page = doc.Pages.Add();
    //Creates a new Redaction annotation.
    PdfRedactionAnnotation annot = new PdfRedactionAnnotation();
    //set the bounds
    annot.Bounds = new Rectangle(100, 120, 100, 100);
    //set the innercolor
    annot.InnerColor = Color.Aqua;
    //set the bordercolor
    annot.BorderColor = Color.Orange;
    //set the textcolor
    annot.TextColor = Color.Yellow;
    //set the font
    annot.Font = new PdfStandardFont(PdfFontFamily.Helvetica, 10);
    //set overlaytext
    annot.OverlayText = "Redact";
    //set textalignment
    annot.TextAlignment = PdfTextAlignment.Right; 
    annot.Repeat = true;
    annot.SetAppearance(true);
    ////Add the annotation to the page.
    page.Annotations.Add(annot);
    //Saves the document to disk.
    doc.Save("empty.pdf");
    doc.Close(true);
     //Create a new PDF document.
    Dim doc As PdfDocument = New PdfDocument()
    //Create a new page.
    Dim page As PdfPage = doc.Pages.Add()
    //Creates a new Redaction annotation.
    Dim annot As PdfRedactionAnnotation = New PdfRedactionAnnotation()
    //set the bounds
    annot.Bounds = New Rectangle(100, 120, 100, 100)
    //set the innercolor
    annot.InnerColor = Color.Aqua
    //set the bordercolor
    annot.BorderColor = Color.Orange
    //set the textcolor
    annot.TextColor = Color.Yellow
    annot.Font = New PdfStandardFont(PdfFontFamily.Helvetica, 10)
    annot.OverlayText = "Redact"
    annot.TextAlignment = PdfTextAlignment.Right
    annot.Repeat = True
    annot.SetAppearance(True)
    page.Annotations.Add(annot)
    //Saves the document to disk.
    doc.Save("empty.pdf")
    doc.Close(True)

    OverlayText

    Get or set the overlaytext of redaction annotation

    Declaration
    public string OverlayText { get; set; }
    Property Value
    Type
    System.String
    Examples
    //Create a new PDF document.
    PdfDocument doc = new PdfDocument();
    //Create a new page.
    PdfPage page = doc.Pages.Add();
    //Creates a new Redaction annotation.
    PdfRedactionAnnotation annot = new PdfRedactionAnnotation();
    //set the bounds
    annot.Bounds = new Rectangle(100, 120, 100, 100);
    //set the innercolor
    annot.InnerColor = Color.Aqua;
    //set the bordercolor
    annot.BorderColor = Color.Orange;
    //set the textcolor
    annot.TextColor = Color.Yellow;
    //set the font
    annot.Font = new PdfStandardFont(PdfFontFamily.Helvetica, 10);
    //set overlaytext
    annot.OverlayText = "Redact";
    //set textalignment
    annot.TextAlignment = PdfTextAlignment.Right; 
    annot.Repeat = true;
    annot.SetAppearance(true);
    ////Add the annotation to the page.
    page.Annotations.Add(annot);
    //Saves the document to disk.
    doc.Save("empty.pdf");
    doc.Close(true);
    System.Diagnostics.Process.Start("empty.pdf");
     //Create a new PDF document.
    Dim doc As PdfDocument = New PdfDocument()
    //Create a new page.
    Dim page As PdfPage = doc.Pages.Add()
    //Creates a new Redaction annotation.
    Dim annot As PdfRedactionAnnotation = New PdfRedactionAnnotation()
    //set the bounds
    annot.Bounds = New Rectangle(100, 120, 100, 100)
    //set the innercolor
    annot.InnerColor = Color.Aqua
    //set the bordercolor
    annot.BorderColor = Color.Orange
    //set the textcolor
    annot.TextColor = Color.Yellow
    annot.Font = New PdfStandardFont(PdfFontFamily.Helvetica, 10)
    annot.OverlayText = "Redact"
    annot.TextAlignment = PdfTextAlignment.Right
    annot.Repeat = True
    annot.SetAppearance(True)
    page.Annotations.Add(annot)
    //Saves the document to disk.
    doc.Save("empty.pdf")
    doc.Close(True)
    System.Diagnostics.Process.Start("empty.pdf");

    RepeatText

    Get or set the text repeat of redaction annotation

    Declaration
    public bool RepeatText { get; set; }
    Property Value
    Type
    System.Boolean
    Examples
    //Create a new PDF document.
    PdfDocument doc = new PdfDocument();
    //Create a new page.
    PdfPage page = doc.Pages.Add();
    //Creates a new Redaction annotation.
    PdfRedactionAnnotation annot = new PdfRedactionAnnotation();
    //set the bounds
    annot.Bounds = new Rectangle(100, 120, 100, 100);
    //set the innercolor
    annot.InnerColor = Color.Aqua;
    //set the bordercolor
    annot.BorderColor = Color.Orange;
    //set the textcolor
    annot.TextColor = Color.Yellow;
    //set the font
    annot.Font = new PdfStandardFont(PdfFontFamily.Helvetica, 10);
    //set overlaytext
    annot.OverlayText = "Redact";
    //set textalignment
    annot.TextAlignment = PdfTextAlignment.Right; 
    annot.RepeatText = true;
    annot.SetAppearance(true);
    ////Add the annotation to the page.
    page.Annotations.Add(annot);
    //Saves the document to disk.
    doc.Save("empty.pdf");
    doc.Close(true);
    System.Diagnostics.Process.Start("empty.pdf");
     //Create a new PDF document.
    Dim doc As PdfDocument = New PdfDocument()
    //Create a new page.
    Dim page As PdfPage = doc.Pages.Add()
    //Creates a new Redaction annotation.
    Dim annot As PdfRedactionAnnotation = New PdfRedactionAnnotation()
    //set the bounds
    annot.Bounds = New Rectangle(100, 120, 100, 100)
    //set the innercolor
    annot.InnerColor = Color.Aqua
    //set the bordercolor
    annot.BorderColor = Color.Orange
    //set the textcolor
    annot.TextColor = Color.Yellow
    annot.Font = New PdfStandardFont(PdfFontFamily.Helvetica, 10)
    annot.OverlayText = "Redact"
    annot.TextAlignment = PdfTextAlignment.Right
    annot.RepeatText = True
    annot.SetAppearance(True)
    page.Annotations.Add(annot)
    //Saves the document to disk.
    doc.Save("empty.pdf")
    doc.Close(True)
    System.Diagnostics.Process.Start("empty.pdf");

    ReviewHistory

    Gets the annotation review history.

    Declaration
    public PdfPopupAnnotationCollection ReviewHistory { get; }
    Property Value
    Type Description
    PdfPopupAnnotationCollection

    Returns a PdfPopupAnnotationCollection containing the reviews associated with the annotation.

    Examples
    //Create a new PDF document.
    PdfDocument document = new PdfDocument();
    //Create a new page .
    PdfPage page = document.Pages.Add();
    //Create a new pdf redaction annotation.
    PdfRedactionAnnotation redactionAnnotation = new PdfRedactionAnnotation();
    redactionAnnotation.Bounds = new Rectangle(100, 120, 100, 100);
    redactionAnnotation.InnerColor = new PdfColor(Color.Red);
    redactionAnnotation.TextColor = new PdfColor(Color.Black);
    redactionAnnotation.Font = new PdfStandardFont(PdfFontFamily.Helvetica, 10);
    redactionAnnotation.OverlayText = "Redaction Annotation";
    redactionAnnotation.TextAlignment = PdfTextAlignment.Center;
    redactionAnnotation.RepeatText = true;
    // Add a popup annotation for review.
    PdfPopupAnnotation popup = new PdfPopupAnnotation();
    popup.State = PdfAnnotationState.Accepted;
    popup.StateModel = PdfAnnotationStateModel.Review;
    popup.Text = "Hello PDF Comments";
    redactionAnnotation.ReviewHistory.Add(popup);
    // Get Review history.
    PdfPopupAnnotationCollection reviewCollection = redactionAnnotation.ReviewHistory;
    // Save the document to disk.
    document.Save("Output.pdf");
    document.Close(true);
    Dim document As PdfDocument = New PdfDocument
    Dim page As PdfPage = document.Pages.Add
    Dim rectangle As RectangleF = New RectangleF(40, 60, 80, 20)
    Dim redactionAnnotation As PdfRedactionAnnotation = New PdfRedactionAnnotation()
    redactionAnnotation.Bounds = rectangle
    redactionAnnotation.InnerColor = New PdfColor(Color.Red)
    redactionAnnotation.BorderColor = New PdfColor(Color.Yellow)
    redactionAnnotation.TextColor = New PdfColor(Color.Black)
    redactionAnnotation.Font = New PdfStandardFont(PdfFontFamily.Helvetica, 10)
    redactionAnnotation.OverlayText = "Redaction Annotation"
    redactionAnnotation.TextAlignment = PdfTextAlignment.Center
    redactionAnnotation.RepeatText = True
    Dim popup As PdfPopupAnnotation = New PdfPopupAnnotation
    popup.State = PdfAnnotationState.Accepted
    popup.StateModel = PdfAnnotationStateModel.Review
    popup.Text = "Hello PDF Comments"
    redactionAnnotation.ReviewHistory.Add(popup)
    Dim reviewCollection As PdfPopupAnnotationCollection = redactionAnnotation.ReviewHistory
    ' Save the document to disk.
    document.Save("Output.pdf")
    document.Close(true)

    TextAlignment

    Get or set the textalignment of redaction annotation

    Declaration
    public PdfTextAlignment TextAlignment { get; set; }
    Property Value
    Type
    PdfTextAlignment
    Examples
    //Create a new PDF document.
    PdfDocument doc = new PdfDocument();
    //Create a new page.
    PdfPage page = doc.Pages.Add();
    //Creates a new Redaction annotation.
    PdfRedactionAnnotation annot = new PdfRedactionAnnotation();
    //set the bounds
    annot.Bounds = new Rectangle(100, 120, 100, 100);
    //set the innercolor
    annot.InnerColor = Color.Aqua;
    //set the bordercolor
    annot.BorderColor = Color.Orange;
    //set the textcolor
    annot.TextColor = Color.Yellow;
    //set the font
    annot.Font = new PdfStandardFont(PdfFontFamily.Helvetica, 10);
    //set overlaytext
    annot.OverlayText = "Redact";
    //set textalignment
    annot.TextAlignment = PdfTextAlignment.Right; 
    annot.Repeat = true;
    annot.SetAppearance(true);
    ////Add the annotation to the page.
    page.Annotations.Add(annot);
    //Saves the document to disk.
    doc.Save("empty.pdf");
    doc.Close(true);
    System.Diagnostics.Process.Start("empty.pdf");
     //Create a new PDF document.
    Dim doc As PdfDocument = New PdfDocument()
    //Create a new page.
    Dim page As PdfPage = doc.Pages.Add()
    //Creates a new Redaction annotation.
    Dim annot As PdfRedactionAnnotation = New PdfRedactionAnnotation()
    //set the bounds
    annot.Bounds = New Rectangle(100, 120, 100, 100)
    //set the innercolor
    annot.InnerColor = Color.Aqua
    //set the bordercolor
    annot.BorderColor = Color.Orange
    //set the textcolor
    annot.TextColor = Color.Yellow
    annot.Font = New PdfStandardFont(PdfFontFamily.Helvetica, 10)
    annot.OverlayText = "Redact"
    annot.TextAlignment = PdfTextAlignment.Right
    annot.Repeat = True
    annot.SetAppearance(True)
    page.Annotations.Add(annot)
    //Saves the document to disk.
    doc.Save("empty.pdf")
    doc.Close(True)
    System.Diagnostics.Process.Start("empty.pdf");

    TextColor

    Get or set the textcolor of redaction annotation

    Declaration
    public PdfColor TextColor { get; set; }
    Property Value
    Type
    PdfColor
    Examples
    //Create a new PDF document.
    PdfDocument doc = new PdfDocument();
    //Create a new page.
    PdfPage page = doc.Pages.Add();
    //Creates a new Redaction annotation.
    PdfRedactionAnnotation annot = new PdfRedactionAnnotation();
    //set the bounds
    annot.Bounds = new Rectangle(100, 120, 100, 100);
    //set the innercolor
    annot.InnerColor = Color.Aqua;
    //set the bordercolor
    annot.BorderColor = Color.Orange;
    //set the textcolor
    annot.TextColor = Color.Yellow;
    //set the font
    annot.Font = new PdfStandardFont(PdfFontFamily.Helvetica, 10);
    //set overlaytext
    annot.OverlayText = "Redact";
    //set textalignment
    annot.TextAlignment = PdfTextAlignment.Right; 
    annot.Repeat = true;
    annot.SetAppearance(true);
    ////Add the annotation to the page.
    page.Annotations.Add(annot);
    //Saves the document to disk.
    doc.Save("empty.pdf");
    doc.Close(true);
    System.Diagnostics.Process.Start("empty.pdf");
     //Create a new PDF document.
    Dim doc As PdfDocument = New PdfDocument()
    //Create a new page.
    Dim page As PdfPage = doc.Pages.Add()
    //Creates a new Redaction annotation.
    Dim annot As PdfRedactionAnnotation = New PdfRedactionAnnotation()
    //set the bounds
    annot.Bounds = New Rectangle(100, 120, 100, 100)
    //set the innercolor
    annot.InnerColor = Color.Aqua
    //set the bordercolor
    annot.BorderColor = Color.Orange
    //set the textcolor
    annot.TextColor = Color.Yellow
    annot.Font = New PdfStandardFont(PdfFontFamily.Helvetica, 10)
    annot.OverlayText = "Redact"
    annot.TextAlignment = PdfTextAlignment.Right
    annot.Repeat = True
    annot.SetAppearance(True)
    page.Annotations.Add(annot)
    //Saves the document to disk.
    doc.Save("empty.pdf")
    doc.Close(True)
    System.Diagnostics.Process.Start("empty.pdf");

    Methods

    Initialize()

    Initializes annotation object.

    Declaration
    protected override void Initialize()
    Overrides
    PdfAnnotation.Initialize()

    Save()

    Saves an annotation.

    Declaration
    protected override void Save()
    Overrides
    PdfAnnotation.Save()

    Implements

    System.ComponentModel.INotifyPropertyChanged
    Back to top Generated by DocFX