Table of Contents

Class PdfLoadedTextMarkupAnnotation

Namespace
Syncfusion.Pdf.Interactive
Assembly
Syncfusion.Pdf.Portable.dll

Represents the loaded text markup annotation class.

public class PdfLoadedTextMarkupAnnotation : PdfLoadedStyledAnnotation, INotifyPropertyChanged
Inheritance
PdfLoadedTextMarkupAnnotation
Implements
Inherited Members

Examples

//Load an existing document.
PdfLoadedDocument document = new PdfLoadedDocument(@"..\..\Annotations.pdf");
//Gets the annotation from loaded document.
PdfLoadedTextMarkupAnnotation textMarkupAnnotation = document.Pages[1].Annotations[5] as PdfLoadedTextMarkupAnnotation;
//Sets the PDF text markup annotation type
textMarkupAnnotation.TextMarkupAnnotationType=PdfTextMarkupAnnotationType.Highlight
//Sets the text markup color
textMarkupAnnotation.TextMarkupColor=new PdfColor(Color.Blue);
//Save the document.
document.Save("TextMarkupAnnotation.pdf");
document.Close(true);
'Load an existing document.
Dim document As New PdfLoadedDocument("..\..\Annotations.pdf")
'Gets the annotation from loaded document.
Dim textMarkupAnnotation As PdfLoadedTextMarkupAnnotation = document.Pages(1).Annotations(5) as PdfLoadedTextMarkupAnnotation
'Sets the PDF text markup annotation type
 textMarkupAnnotation.TextMarkupAnnotationType=PdfTextMarkupAnnotationType.Highlight
'Sets the text markup color
textMarkupAnnotation.TextMarkupColor=New PdfColor(Color.Blue)
'Save the document.
document.Save("TextMarkupAnnotation.pdf")
document.Close(True)

Properties

BoundsCollection

Gets or sets text markup bounds collection.

public List<RectangleF> BoundsCollection { get; set; }

Property Value

List<RectangleF>

Examples

//load the document
PdfLoadedDocument loadedDocument = new PdfLoadedDocument("input.pdf");
//Gets the annotation collection
PdfLoadedAnnotationCollection collection = loadedDocument.Pages[0].Annotations;
//Gets the text markup annotation
PdfLoadedTextMarkupAnnotation pdfLoadedTextMarkup = collection[0] as PdfLoadedTextMarkupAnnotation;
//Gets the text markup annotation bounds collection.
List<RectangleF> boundsCollection = pdfLoadedTextMarkup.BoundsCollection;
//Save the document
loadedDocument.Save("Sample.pdf");
//Close the document
loadedDocument.Close(true);
//load the document
Dim loadedDocument As PdfLoadedDocument = New PdfLoadedDocument("input.pdf")
//Gets the annotation collection
Dim collection As PdfLoadedAnnotationCollection = loadedDocument.Pages(0).Annotations
//Gets the text markup annotation
Dim pdfLoadedTextMarkup As PdfLoadedTextMarkupAnnotation = TryCast(collection(0), PdfLoadedTextMarkupAnnotation)
//Gets the text markup annotation bounds collection.
Dim boundsCollection As List(Of RectangleF) = pdfLoadedTextMarkup.BoundsCollection
//Save the document
loadedDocument.Save("Sample.pdf")
//Close the document
loadedDocument.Close(True)
See Also

Comments

Gets the annotation comments history.

public PdfLoadedPopupAnnotationCollection Comments { get; }

Property Value

PdfLoadedPopupAnnotationCollection

The Comments collection of the text markup annotation.

Examples

//Load an existing document.
PdfLoadedDocument document = new PdfLoadedDocument(@"..\..\Annotations.pdf");
//Load the existing PdfTextMarkupAnnotation
PdfLoadedTextMarkupAnnotation  markup = document.Pages[0].Annotations[0] as PdfLoadedTextMarkupAnnotation;
//Get the comments collection
PdfLoadedPopupAnnotationCollection commentsCollection = markup.Comments;
//save the document
document.Save("TextMarkupAnnotation.pdf");
//Close the docuemnt
document.Close(true);
'Load an existing document.
Dim document As New PdfLoadedDocument("..\..\Annotations.pdf")
'Load the existing PdfTextMarkupAnnotation
Dim markup As PdfLoadedTextMarkupAnnotation = document.Pages(0).Annotations(0)
'Get the comments collection
Dim commentsCollection As PdfLoadedPopupAnnotationCollection = markup.Comments
Next
'save the document
document.Save("TextMarkupAnnotation.pdf")
'Close the document.
document.Close(True)
See Also

ReviewHistory

Gets the annotation review history.

public PdfLoadedPopupAnnotationCollection ReviewHistory { get; }

Property Value

PdfLoadedPopupAnnotationCollection

The review history collection of the text markup annotation.

Examples

//Load an existing document.
PdfLoadedDocument document = new PdfLoadedDocument(@"..\..\Annotations.pdf");
//Load the existing PdfTextMarkupAnnotation
PdfLoadedTextMarkupAnnotation  markup = document.Pages[0].Annotations[0] as PdfLoadedTextMarkupAnnotation;
//Get the review collection
PdfLoadedPopupAnnotationCollection reviewCollection = markup.ReviewHistory;
//save the document
document.Save("TextMarkupAnnotation.pdf");
//Close the docuemnt
document.Close(true);
'Load an existing document.
Dim document As New PdfLoadedDocument("..\..\Annotations.pdf")
'Load the existing PdfTextMarkupAnnotation
Dim markup As PdfLoadedTextMarkupAnnotation = document.Pages(0).Annotations(0)
'Get the review collection
Dim reviewCollection As PdfLoadedPopupAnnotationCollection = markup.ReviewHistory
Next
'save the document
document.Save("TextMarkupAnnotation.pdf")
'Close the document.
document.Close(True)
See Also

TextMarkupAnnotationType

Gets or sets the markup annotation Type.

public PdfTextMarkupAnnotationType TextMarkupAnnotationType { get; set; }

Property Value

PdfTextMarkupAnnotationType

Examples

//Load an existing document.
PdfLoadedDocument document = new PdfLoadedDocument(@"..\..\Annotations.pdf");
//Gets the annotation from loaded document.
PdfLoadedTextMarkupAnnotation textMarkupAnnotation = document.Pages[1].Annotations[5] as PdfLoadedTextMarkupAnnotation;
//Sets the PDF text markup annotation type
textMarkupAnnotation.TextMarkupAnnotationType=PdfTextMarkupAnnotationType.Highlight
//Save the document.
document.Save("TextMarkupAnnotation.pdf");
document.Close(true);
'Load an existing document.
Dim document As New PdfLoadedDocument("..\..\Annotations.pdf")
'Gets the annotation from loaded document.
Dim textMarkupAnnotation As PdfLoadedTextMarkupAnnotation = document.Pages(1).Annotations(5) as PdfLoadedTextMarkupAnnotation
'Sets the PDF text markup annotation type
textMarkupAnnotation.TextMarkupAnnotationType=PdfTextMarkupAnnotationType.Highlight
'Save the document.
document.Save("TextMarkupAnnotation.pdf")
document.Close(True)
See Also

TextMarkupColor

Gets or sets the markup color

public PdfColor TextMarkupColor { get; set; }

Property Value

PdfColor

Examples

//Load an existing document.
PdfLoadedDocument document = new PdfLoadedDocument(@"..\..\Annotations.pdf");
//Gets the annotation from loaded document.
PdfLoadedTextMarkupAnnotation textMarkupAnnotation = document.Pages[1].Annotations[5] as PdfLoadedTextMarkupAnnotation;
//Sets the text markup color
textMarkupAnnotation.TextMarkupColor=new PdfColor(Color.Blue);
//Save the document.
document.Save("TextMarkupAnnotation.pdf");
document.Close(true);
'Load an existing document.
Dim document As New PdfLoadedDocument("..\..\Annotations.pdf")
'Gets the annotation from loaded document.
Dim textMarkupAnnotation As PdfLoadedTextMarkupAnnotation = document.Pages(1).Annotations(5) as PdfLoadedTextMarkupAnnotation
'Sets the text markup color
textMarkupAnnotation.TextMarkupColor=New PdfColor(Color.Blue)
'Save the document.
document.Save("TextMarkupAnnotation.pdf")
document.Close(True)
See Also

Methods

Save()

Saves an annotation .

protected override void Save()
See Also

SetTitleText(string)

Sets the name of the field.

public void SetTitleText(string text)

Parameters

text string
See Also

See Also