PdfLoadedPopupAnnotation Class
Represents the loaded pop up annotation class.
Inheritance
Implements
Inherited Members
Namespace: Syncfusion.Pdf.Interactive
Assembly: Syncfusion.Pdf.Base.dll
Syntax
public class PdfLoadedPopupAnnotation : PdfLoadedStyledAnnotation, IPdfWrapper, INotifyPropertyChanged
Remarks
This PdfLoadedPopupAnnotation class is used to load the pop up annotation from the PDF document. Please refer the UG docuemntation link https://help.syncfusion.com/file-/pdf/working-with-annotations#modifying-the-annotations for more details.
Examples
formats
//Load an existing document.
PdfLoadedDocument document = new PdfLoadedDocument(@"..\..\Annotations.pdf");
//Gets the annotation from loaded document.
PdfLoadedPopupAnnotation popupAnnotation = document.Pages[1].Annotations[5] as PdfLoadedPopupAnnotation;
//Sets the popup annotation border
popupAnnotation.Border.Width = 4;
popupAnnotation.Border.HorizontalRadius = 20;
popupAnnotation.Border.VerticalRadius = 30;
//Set the popup icon
popupAnnotation.Icon = PdfPopupIcon.Key;
//Save the document.
document.Save("popupAnnotation.pdf");
document.Close(true);
'Load an existing document.
Dim document As New PdfLoadedDocument("..\..\Annotations.pdf")
'Gets the annotation from loaded document.
Dim popupAnnotation As PdfLoadedPopupAnnotation = document.Pages(1).Annotations(5)
'Sets the popup annotation border
popupAnnotation.Border.Width = 4
popupAnnotation.Border.HorizontalRadius = 20
popupAnnotation.Border.VerticalRadius = 30
'Set the popup icon
popupAnnotation.Icon = PdfPopupIcon.Key
'Save the document.
document.Save("popupAnnotation.pdf")
document.Close(True)
Properties
Comments
Gets the annotation Comments history.
Declaration
public PdfLoadedPopupAnnotationCollection Comments { get; }
Property Value
Type | Description |
---|---|
PdfLoadedPopupAnnotationCollection | The Comments collection of the popup annotation. |
Examples
//Load an existing document.
PdfLoadedDocument document = new PdfLoadedDocument(@"..\..\Annotations.pdf");
//Load the existing PdfPopupAnnotation
PdfLoadedPopupAnnotation popup = document.Pages[0].Annotations[0] as PdfLoadedPopupAnnotation;
//Get the Comments collection
PdfLoadedPopupAnnotationCollection CommentsCollection = popup.Comments;
//save the document
document.Save("PopupAnnotation.pdf");
//Close the docuemnt
document.Close(true);
'Load an existing document.
Dim document As New PdfLoadedDocument("..\..\Annotations.pdf")
'Load the existing PdfPopupAnnotation
Dim popup As PdfLoadedFreeTextAnnotation = document.Pages(0).Annotations(0)
'Get the Comments collection
Dim CommentsCollection As PdfLoadedPopupAnnotationCollection = popup.Comments
'save the document
document.Save("PopupAnnotation.pdf")
'Close the document.
document.Close(True)
See Also
Icon
Gets or sets the icon of the annotation.
Declaration
public PdfPopupIcon Icon { get; set; }
Property Value
Type |
---|
PdfPopupIcon |
Examples
//Load an existing document.
PdfLoadedDocument document = new PdfLoadedDocument(@"..\..\Annotations.pdf");
//Gets the annotation from loaded document.
PdfLoadedPopupAnnotation popupAnnotation = document.Pages[1].Annotations[5] as PdfLoadedPopupAnnotation;
//Set the PDF popup icon
popupAnnotation.Icon = PdfPopupIcon.Key;
//Save the document.
document.Save("popupAnnotation.pdf");
document.Close(true);
'Load an existing document.
Dim document As New PdfLoadedDocument("..\..\Annotations.pdf")
'Gets the annotation from loaded document.
Dim popupAnnotation As PdfLoadedPopupAnnotation = document.Pages(1).Annotations(5)
'Set the PDF popup icon
popupAnnotation.Icon = PdfPopupIcon.Key
'Save the document.
document.Save("popupAnnotation.pdf")
document.Close(True)
IconName
Gets or sets the pop-up icon name to the text annotation.
Declaration
public string IconName { get; set; }
Property Value
Type |
---|
System.String |
Remarks
UTF-8 text will not be supported in icon names.
Examples
//Load an existing document.
PdfLoadedDocument document = new PdfLoadedDocument(@"..\..\Annotations.pdf");
//Gets the annotation from loaded document.
PdfLoadedPopupAnnotation popupAnnotation = document.Pages[1].Annotations[5] as PdfLoadedPopupAnnotation;
//get the PDF popup icon
string iconName = popupAnnotation.IconName;
//Save the document.
document.Save("popupAnnotation.pdf");
document.Close(true);
'Load an existing document.
Dim document As New PdfLoadedDocument("..\..\Annotations.pdf")
'Gets the annotation from loaded document.
Dim popupAnnotation As PdfLoadedPopupAnnotation = document.Pages(1).Annotations(5)
'Set the PDF popup icon
Dim iconName As String = popupAnnotation.IconName
'Save the document.
document.Save("popupAnnotation.pdf")
document.Close(True)
Open
Gets or sets the open option of the popup annotation.
Declaration
public bool Open { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean | if true open,otherwise not open |
Examples
//Load an existing document.
PdfLoadedDocument document = new PdfLoadedDocument(@"..\..\Annotations.pdf");
//Gets the annotation from loaded document.
PdfLoadedPopupAnnotation popupAnnotation = document.Pages[1].Annotations[5] as PdfLoadedPopupAnnotation;
//Set the popup annotation open option
popupAnnotation.Open = true
//Save the document.
document.Save("popupAnnotation.pdf");
document.Close(true);
'Load an existing document.
Dim document As New PdfLoadedDocument("..\..\Annotations.pdf")
'Gets the annotation from loaded document.
Dim popupAnnotation As PdfLoadedPopupAnnotation = document.Pages(1).Annotations(5)
'Set the popup annotation open option
popupAnnotation.Open = True
'Save the document.
document.Save("popupAnnotation.pdf")
document.Close(True)
ReviewHistory
Gets the annotation review history.
Declaration
public PdfLoadedPopupAnnotationCollection ReviewHistory { get; }
Property Value
Type | Description |
---|---|
PdfLoadedPopupAnnotationCollection | The review collection of the popup annotation. |
Examples
//Load an existing document.
PdfLoadedDocument document = new PdfLoadedDocument(@"..\..\Annotations.pdf");
//Load the existing PdfPopupAnnotation
PdfLoadedPopupAnnotation popup = document.Pages[0].Annotations[0] as PdfLoadedPopupAnnotation;
//Get the review collection
PdfLoadedPopupAnnotationCollection reviewCollection = popup.ReviewHistory;
//save the document
document.Save("PopupAnnotation.pdf");
//Close the docuemnt
document.Close(true);
'Load an existing document.
Dim document As New PdfLoadedDocument("..\..\Annotations.pdf")
'Load the existing PdfPopupAnnotation
Dim popup As PdfLoadedFreeTextAnnotation = document.Pages(0).Annotations(0)
'Get the review collection
Dim reviewCollection As PdfLoadedPopupAnnotationCollection = popup.ReviewHistory
'save the document
document.Save("PopupAnnotation.pdf")
'Close the document.
document.Close(True)
See Also
State
Get or sets the annotation State.
Declaration
public PdfAnnotationState State { get; set; }
Property Value
Type |
---|
PdfAnnotationState |
Examples
//Load an existing document.
PdfLoadedDocument document = new PdfLoadedDocument(@"..\..\Annotations.pdf");
//Load the existing PdfFreeTextAnnotation
PdfLoadedFreeTextAnnotation free = document.Pages[0].Annotations[0] as PdfLoadedFreeTextAnnotation;
//Get the review collection
PdfLoadedPopupAnnotationCollection reviewCollection = free.ReviewHistory;
foreach (PdfLoadedPopupAnnotation popup in reviewCollection){
//Gets the annotation state
PdfAnnotationState state = popup.AnnotationState;
//Gets the annotation state model
PdfAnnotationStateModel model = popup.AnnotationStateModel;
}
//save the document
document.Save("FreetextAnnotation.pdf");
//Close the docuemnt
document.Close(true);
'Load an existing document.
Dim document As New PdfLoadedDocument("..\..\Annotations.pdf")
'Load the existing PdfFreeTextAnnotation
Dim free As PdfLoadedFreeTextAnnotation = document.Pages(0).Annotations(0)
'Get the review collection
Dim reviewCollection As PdfLoadedPopupAnnotationCollection = free.ReviewHistory
For Each popup As PdfLoadedPopupAnnotation In reviewCollection
'Get the annotation state
Dim state As PdfAnnotationState = popup.AnnotationState
'Get the annotation state model
Dim model As PdfAnnotationStateModel = popup.AnnotationStateModel
Next
'save the document
document.Save("FreetextAnnotation.pdf")
'Close the document.
document.Close(True)
StateModel
Get or sets the annotation State Model.
Declaration
public PdfAnnotationStateModel StateModel { get; set; }
Property Value
Type |
---|
PdfAnnotationStateModel |
Examples
//Load an existing document.
PdfLoadedDocument document = new PdfLoadedDocument(@"..\..\Annotations.pdf");
//Load the existing PdfFreeTextAnnotation
PdfLoadedFreeTextAnnotation free = document.Pages[0].Annotations[0] as PdfLoadedFreeTextAnnotation;
//Get the review collection
PdfLoadedPopupAnnotationCollection reviewCollection = free.ReviewHistory;
foreach (PdfLoadedPopupAnnotation popup in reviewCollection){
//Gets the annotation state
PdfAnnotationState state = popup.AnnotationState;
//Gets the annotation state model
PdfAnnotationStateModel model = popup.AnnotationStateModel;
}
//save the document
document.Save("FreetextAnnotation.pdf");
//Close the docuemnt
document.Close(true);
'Load an existing document.
Dim document As New PdfLoadedDocument("..\..\Annotations.pdf")
'Load the existing PdfFreeTextAnnotation
Dim free As PdfLoadedFreeTextAnnotation = document.Pages(0).Annotations(0)
'Get the review collection
Dim reviewCollection As PdfLoadedPopupAnnotationCollection = free.ReviewHistory
For Each popup As PdfLoadedPopupAnnotation In reviewCollection
'Get the annotation state
Dim state As PdfAnnotationState = popup.AnnotationState
'Get the annotation state model
Dim model As PdfAnnotationStateModel = popup.AnnotationStateModel
Next
'save the document
document.Save("FreetextAnnotation.pdf")
'Close the document.
document.Close(True)
Methods
CreateApperance()
Modify popup annotation appearance
Declaration
protected void CreateApperance()
Save()
Saves an annotation.
Declaration
protected override void Save()