PdfLoadedTextMarkupAnnotation Class
Represents the loaded text markup annotation class.
Inheritance
System.Object
PdfLoadedTextMarkupAnnotation
Implements
System.ComponentModel.INotifyPropertyChanged
Inherited Members
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 PdfLoadedTextMarkupAnnotation : PdfLoadedStyledAnnotation, IPdfWrapper, INotifyPropertyChanged
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.
Declaration
public List<RectangleF> BoundsCollection { get; set; }
Property Value
Type |
---|
System.Collections.Generic.List<System.Drawing.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)
Comments
Gets the annotation comments history.
Declaration
public PdfLoadedPopupAnnotationCollection Comments { get; }
Property Value
Type | Description |
---|---|
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.
Declaration
public PdfLoadedPopupAnnotationCollection ReviewHistory { get; }
Property Value
Type | Description |
---|---|
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.
Declaration
public PdfTextMarkupAnnotationType TextMarkupAnnotationType { get; set; }
Property Value
Type |
---|
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)
TextMarkupColor
Gets or sets the markup color
Declaration
public PdfColor TextMarkupColor { get; set; }
Property Value
Type |
---|
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)
Methods
Save()
Saves an annotation .
Declaration
protected override void Save()
Overrides
SetTitleText(String)
Sets the name of the field.
Declaration
public void SetTitleText(string text)
Parameters
Type | Name | Description |
---|---|---|
System.String | text |
Implements
System.ComponentModel.INotifyPropertyChanged