Class PdfLoadedRubberStampAnnotation
Represents the loaded rubber stamp annotation class.
Inheritance
System.Object
PdfLoadedRubberStampAnnotation
Implements
System.ComponentModel.INotifyPropertyChanged
Inherited Members
Namespace: Syncfusion.Pdf.Interactive
Assembly: Syncfusion.Pdf.Base.dll
Syntax
public class PdfLoadedRubberStampAnnotation : PdfLoadedStyledAnnotation, IPdfWrapper, INotifyPropertyChanged
Examples
//Load an existing document.
PdfLoadedDocument document = new PdfLoadedDocument(@"..\..\Annotations.pdf");
//Gets the annotation from loaded document.
PdfLoadedRubberStampAnnotation rubberStampAnnotation = document.Pages[1].Annotations[5] as PdfLoadedRubberStampAnnotation;
//Sets the rubber stamp annotation border
rubberStampAnnotation.Border.Width = 4;
rubberStampAnnotation.Border.HorizontalRadius = 20;
rubberStampAnnotation.Border.VerticalRadius = 30;
//Set the PDF rubber stamp annotation icon
rubberStampAnnotation.Icon = PdfRubberStampAnnotationIcon.Approved;
//Save the document.
document.Save("RubberStampAnnotation.pdf");
document.Close(true);
'Load an existing document.
Dim document As New PdfLoadedDocument("..\..\Annotations.pdf")
'Gets the annotation from loaded document.
Dim popupAnnotation As PdfLoadedRubberStampAnnotation = document.Pages(1).Annotations(5) as PdfLoadedRubberStampAnnotation
'Sets the rubber stamp annotation border
rubberStampAnnotation.Border.Width = 4
rubberStampAnnotation.Border.HorizontalRadius = 20
rubberStampAnnotation.Border.VerticalRadius = 30
'Set the PDF rubber stamp annotation icon
rubberStampAnnotation.Icon = PdfRubberStampAnnotationIcon.Approved
'Save the document.
document.Save("RubberStampAnnotation.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 rubber stamp annotation. |
Examples
//Load an existing document.
PdfLoadedDocument document = new PdfLoadedDocument(@"..\..\Annotations.pdf");
//Load the existing PdfRubberStampAnnotation
PdfLoadedRubberStampAnnotation rubber = document.Pages[0].Annotations[0] as PdfLoadedRubberStampAnnotation;
//Get the Comments collection
PdfLoadedPopupAnnotationCollection CommentsCollection = rubber.Comments;
//save the document
document.Save("PdfRubberStampAnnotation.pdf");
//Close the docuemnt
document.Close(true);
'Load an existing document.
Dim document As New PdfLoadedDocument("..\..\Annotations.pdf")
'Load the existing PdfRubberStampAnnotation
Dim rubber As PdfLoadedRubberStampAnnotation = document.Pages(0).Annotations(0)
'Get the Comments collection
Dim CommentsCollection As PdfLoadedPopupAnnotationCollection = rubber.Comments
'save the document
document.Save("PdfRubberStampAnnotation.pdf")
'Close the document.
document.Close(True)
See Also
Icon
Gets or sets the icon of the annotation.
Declaration
public PdfRubberStampAnnotationIcon Icon { get; set; }
Property Value
Type | Description |
---|---|
PdfRubberStampAnnotationIcon | The PdfRubberStampAnnotationIcon used to set icon to the rubber stamp annotation |
Examples
//Load an existing document.
PdfLoadedDocument document = new PdfLoadedDocument(@"..\..\Annotations.pdf");
//Gets the annotation from loaded document.
PdfLoadedRubberStampAnnotation rubberStampAnnotation = document.Pages[1].Annotations[5] as PdfLoadedRubberStampAnnotation;
//Set the PDF rubber stamp annotation icon
rubberStampAnnotation.Icon = PdfRubberStampAnnotationIcon.Approved;
//Save the document.
document.Save("RubberStampAnnotation.pdf");
document.Close(true);
'Load an existing document.
Dim document As New PdfLoadedDocument("..\..\Annotations.pdf")
'Gets the annotation from loaded document.
Dim popupAnnotation As PdfLoadedRubberStampAnnotation = document.Pages(1).Annotations(5) as PdfLoadedRubberStampAnnotation
'Set the PDF rubber stamp annotation icon
rubberStampAnnotation.Icon = PdfRubberStampAnnotationIcon.Approved
'Save the document.
document.Save("RubberStampAnnotation.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 rubber stamp annotation. |
Examples
//Load an existing document.
PdfLoadedDocument document = new PdfLoadedDocument(@"..\..\Annotations.pdf");
//Load the existing PdfRubberStampAnnotation
PdfLoadedRubberStampAnnotation rubber = document.Pages[0].Annotations[0] as PdfLoadedRubberStampAnnotation;
//Get the review collection
PdfLoadedPopupAnnotationCollection reviewCollection = rubber.ReviewHistory;
//save the document
document.Save("PdfRubberStampAnnotation.pdf");
//Close the docuemnt
document.Close(true);
'Load an existing document.
Dim document As New PdfLoadedDocument("..\..\Annotations.pdf")
'Load the existing PdfRubberStampAnnotation
Dim rubber As PdfLoadedRubberStampAnnotation = document.Pages(0).Annotations(0)
'Get the review collection
Dim reviewCollection As PdfLoadedPopupAnnotationCollection = rubber.ReviewHistory
'save the document
document.Save("PdfRubberStampAnnotation.pdf")
'Close the document.
document.Close(True)
See Also
Methods
GetImages()
Returns an array of Image objects that represent the images associated with the rubber stamp annotation.
Declaration
public Image[] GetImages()
Returns
Type | Description |
---|---|
System.Drawing.Image[] | An array of Image objects that represent the images associated with the rubber stamp annotation. |
Examples
//Load the existing PDF document.
PdfLoadedDocument ldoc = new PdfLoadedDocument("input.pdf");
//Get the existing PDF page.
PdfLoadedPage lpage = ldoc.Pages[0] as PdfLoadedPage;
//Get the existing rubber stamp annotation.
PdfLoadedRubberStampAnnotation rubberStampAnnotation = lpage.Annotations[0] as PdfLoadedRubberStampAnnotation;
//Get the custom images used for the rubber stamp annotation.
Image[] images = rubberStampAnnotation.GetImages();
//Close the PDF document.
ldoc.Close(true);
'Load the existing PDF document.
Dim ldoc As New PdfLoadedDocument("input.pdf")
'Get the existing PDF page.
Dim lpage As PdfLoadedPage = TryCast(ldoc.Pages(0), PdfLoadedPage)
'Get the existing rubber stamp annotation.
Dim rubberStampAnnotation As PdfLoadedRubberStampAnnotation = TryCast(lpage.Annotations(0), PdfLoadedRubberStampAnnotation)
'Get the custom images used for the rubber stamp annotation.
Dim images As Image() = rubberStampAnnotation.GetImages()
'Close the PDF document.
ldoc.Close(True)
ModifyTemplateAppearance(RectangleF)
Modify rubber stamp appearance
Declaration
protected void ModifyTemplateAppearance(RectangleF bounds)
Parameters
Type | Name | Description |
---|---|---|
System.Drawing.RectangleF | bounds |
Save()
Saves an Annotation
Declaration
protected override void Save()
Overrides
Implements
System.ComponentModel.INotifyPropertyChanged