Xamarin.Android

  • Code Examples
  • Upgrade Guide
  • User Guide
  • Demos
  • Support
  • Forums
  • Download
Class PdfRedactionAnnotation

    Show / Hide Table of Contents

    Class PdfRedactionAnnotation

    Represents the PdfRedactionAnnotation.

    Inheritance
    System.Object
    PdfAnnotation
    PdfRedactionAnnotation
    Implements
    System.ComponentModel.INotifyPropertyChanged
    Inherited Members
    PdfAnnotation.SetAppearance(Boolean)
    PdfAnnotation.CalculateBounds(RectangleF, PdfPage, PdfLoadedPage)
    PdfAnnotation.SetValues(String, String)
    PdfAnnotation.CalculateTemplateBounds(RectangleF, PdfPageBase, PdfTemplate)
    PdfAnnotation.CalculateTemplateBounds(RectangleF, PdfPageBase, PdfTemplate, Boolean, PdfGraphics)
    PdfAnnotation.CalculateTemplateBounds(RectangleF, PdfPageBase, PdfTemplate, Boolean)
    PdfAnnotation.CheckFlatten()
    PdfAnnotation.Color
    PdfAnnotation.Opacity
    PdfAnnotation.InnerColor
    PdfAnnotation.Bounds
    PdfAnnotation.Location
    PdfAnnotation.Size
    PdfAnnotation.Page
    PdfAnnotation.Text
    PdfAnnotation.Author
    PdfAnnotation.Subject
    PdfAnnotation.ModifiedDate
    PdfAnnotation.AnnotationFlags
    PdfAnnotation.FlattenPopUps
    PdfAnnotation.PdfTag
    PdfAnnotation.Layer
    PdfAnnotation.Rotate
    PdfAnnotation.Name
    PdfAnnotation.PropertyChanged
    Namespace: Syncfusion.Pdf.Interactive
    Assembly: Syncfusion.Pdf.Portable.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

    Border

    Get or set the border of redaction annotation

    Declaration
    public LineBorder Border { get; set; }
    Property Value
    Type Description
    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 Description
    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");

    Flatten

    Get or set flatten of redaction annotation

    Declaration
    public bool Flatten { get; set; }
    Property Value
    Type Description
    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 Description
    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);
    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");

    OverlayText

    Get or set the overlaytext of redaction annotation

    Declaration
    public string OverlayText { get; set; }
    Property Value
    Type Description
    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 Description
    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.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");

    TextAlignment

    Get or set the textalignment of redaction annotation

    Declaration
    public PdfTextAlignment TextAlignment { get; set; }
    Property Value
    Type Description
    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 Description
    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
    Copyright © 2001 - 2023 Syncfusion Inc. All Rights Reserved