Class PdfLoadedStyledAnnotation
Represents the PdfLoadedStyledAnnotation class
Inheritance
Implements
Inherited Members
Namespace: Syncfusion.Pdf.Interactive
Assembly: Syncfusion.Pdf.Portable.dll
Syntax
public class PdfLoadedStyledAnnotation : PdfLoadedAnnotation, IPdfWrapper, INotifyPropertyChanged
Examples
//Load an existing document.
PdfLoadedDocument document = new PdfLoadedDocument(@"..\..\Annotations.pdf");
//Gets the annotation from loaded document.
PdfLoadedFileLinkAnnotation fileLinkAnnotation = document.Pages[1].Annotations[6] as PdfLoadedFileLinkAnnotation;
//Sets the annotation flags
attchmentAnnotation.AnnotationFlags=PdfAnnotationFlags.Default;
//Sets the file name.
fileLinkAnnotation.FileName = @"..\..\Data\Manual.txt";
// Set the file link annotation border.
fileLinkAnnotation.Border=new PdfAnnotationBorder(4, 0, 0);
//Set the file link annotation color.
fileLinkAnnotation.Color=new PdfColor(Color.Blue);
//Sets the file link annotation text.
fileLinkAnnotation.Text = "File Link Annotation";
//Save the document.
document.Save("fileLinkAnnotation.pdf");
document.Close(true);
'Load an existing document.
Dim document As New PdfLoadedDocument("..\..\Annotations.pdf")
'Gets the annotation from loaded document.
Dim fileLinkAnnotation As PdfLoadedFileLinkAnnotation = document.Pages(1).Annotations(6) as PdfLoadedFileLinkAnnotation
'Sets the annotation flags
attchmentAnnotation.AnnotationFlags=PdfAnnotationFlags.Default
'Sets the file name.
fileLinkAnnotation.FileName = @"..\..\Data\Manual.txt"
' Set the file link annotation border.
fileLinkAnnotation.Border=New PdfAnnotationBorder(4, 0, 0)
'Set the file link annotation color.
fileLinkAnnotation.Color=New PdfColor(Color.Blue)
'Sets the file link annotation text.
fileLinkAnnotation.Text = "File Link Annotation"
'Save the document.
document.Save("fileLinkAnnotation.pdf")
document.Close(True)
Properties
AnnotationFlags
Gets or sets the annotation flags.
Declaration
public override PdfAnnotationFlags AnnotationFlags { get; set; }
Property Value
Type |
---|
PdfAnnotationFlags |
Overrides
Examples
//Load an existing document.
PdfLoadedDocument document = new PdfLoadedDocument(@"..\..\Annotations.pdf");
//Gets the annotation from loaded document.
PdfLoadedFileLinkAnnotation fileLinkAnnotation = document.Pages[1].Annotations[6] as PdfLoadedFileLinkAnnotation;
//Sets the annotation flags
attchmentAnnotation.AnnotationFlags=PdfAnnotationFlags.Default;
//Save the document.
document.Save("fileLinkAnnotation.pdf");
document.Close(true);
'Load an existing document.
Dim document As New PdfLoadedDocument("..\..\Annotations.pdf")
'Gets the annotation from loaded document.
Dim fileLinkAnnotation As PdfLoadedFileLinkAnnotation = document.Pages(1).Annotations(6) as PdfLoadedFileLinkAnnotation
'Sets the annotation flags
attchmentAnnotation.AnnotationFlags=PdfAnnotationFlags.Default
'Save the document.
document.Save("fileLinkAnnotation.pdf")
document.Close(True)
Author
Gets or Sets the Author of the annotation.
Declaration
public override string Author { get; set; }
Property Value
Type |
---|
System.String |
Overrides
Border
Gets or sets the annotation's border.
Declaration
public override PdfAnnotationBorder Border { get; set; }
Property Value
Type |
---|
PdfAnnotationBorder |
Overrides
Examples
//Load an existing document.
PdfLoadedDocument document = new PdfLoadedDocument(@"..\..\Annotations.pdf");
//Gets the annotation from loaded document.
PdfLoadedFileLinkAnnotation fileLinkAnnotation = document.Pages[1].Annotations[6] as PdfLoadedFileLinkAnnotation;
//Sets the annotation flags
attchmentAnnotation.AnnotationFlags=PdfAnnotationFlags.Default;
// Set the file link annotation border.
fileLinkAnnotation.Border=new PdfAnnotationBorder(4, 0, 0);
//Save the document.
document.Save("fileLinkAnnotation.pdf");
document.Close(true);
'Load an existing document.
Dim document As New PdfLoadedDocument("..\..\Annotations.pdf")
'Gets the annotation from loaded document.
Dim fileLinkAnnotation As PdfLoadedFileLinkAnnotation = document.Pages(1).Annotations(6) as PdfLoadedFileLinkAnnotation
' Set the file link annotation border.
fileLinkAnnotation.Border=New PdfAnnotationBorder(4, 0, 0)
'Save the document.
document.Save("fileLinkAnnotation.pdf")
document.Close(True)
Bounds
Gets or sets the annotation's bounds. If this property is not set, bounds are calculated automatically based on Location property and content of annotation.
Declaration
public override RectangleF Bounds { get; set; }
Property Value
Type |
---|
RectangleF |
Overrides
Examples
//Load an existing document.
PdfLoadedDocument document = new PdfLoadedDocument(@"..\..\Annotations.pdf");
//Gets the annotation from loaded document.
PdfLoadedFileLinkAnnotation fileLinkAnnotation = document.Pages[1].Annotations[6] as PdfLoadedFileLinkAnnotation;
'Sets the file link annotation bounds.
fileLinkAnnotation.Bounds = new RectangleF(100,100,50,50);
//Save the document.
document.Save("fileLinkAnnotation.pdf");
document.Close(true);
'Load an existing document.
Dim document As New PdfLoadedDocument("..\..\Annotations.pdf")
'Gets the annotation from loaded document.
Dim fileLinkAnnotation As PdfLoadedFileLinkAnnotation = document.Pages(1).Annotations(6) as PdfLoadedFileLinkAnnotation
'Sets the file link annotation bounds.
fileLinkAnnotation.Bounds = New RectangleF(100,100,50,50)
'Save the document.
document.Save("fileLinkAnnotation.pdf")
document.Close(True)
Color
Gets or sets the color.
Declaration
public override PdfColor Color { get; set; }
Property Value
Type | Description |
---|---|
PdfColor | The color. |
Overrides
Examples
//Load an existing document.
PdfLoadedDocument document = new PdfLoadedDocument(@"..\..\Annotations.pdf");
//Gets the annotation from loaded document.
PdfLoadedFileLinkAnnotation fileLinkAnnotation = document.Pages[1].Annotations[6] as PdfLoadedFileLinkAnnotation;
//Set the file link annotation color.
fileLinkAnnotation.Color=new PdfColor(Color.Blue);
//Save the document.
document.Save("fileLinkAnnotation.pdf");
document.Close(true);
'Load an existing document.
Dim document As New PdfLoadedDocument("..\..\Annotations.pdf")
'Gets the annotation from loaded document.
Dim fileLinkAnnotation As PdfLoadedFileLinkAnnotation = document.Pages(1).Annotations(6) as PdfLoadedFileLinkAnnotation
'Set the file link annotation color.
fileLinkAnnotation.Color=New PdfColor(Color.Blue)
'Save the document.
document.Save("fileLinkAnnotation.pdf")
document.Close(True)
InnerColor
Gets or sets the inner color of the annotation, Default color is transparent
Declaration
public override PdfColor InnerColor { get; set; }
Property Value
Type |
---|
PdfColor |
Overrides
Location
Gets or sets the location.
Declaration
public override PointF Location { get; set; }
Property Value
Type |
---|
PointF |
Overrides
Examples
//Load an existing document.
PdfLoadedDocument document = new PdfLoadedDocument(@"..\..\Annotations.pdf");
//Gets the annotation from loaded document.
PdfLoadedFileLinkAnnotation fileLinkAnnotation = document.Pages[1].Annotations[6] as PdfLoadedFileLinkAnnotation;
//Sets the file link Annotation location.
fileLinkAnnotation.Location new PointF(100,100);
//Save the document.
document.Save("fileLinkAnnotation.pdf");
document.Close(true);
'Load an existing document.
Dim document As New PdfLoadedDocument("..\..\Annotations.pdf")
'Gets the annotation from loaded document.
Dim fileLinkAnnotation As PdfLoadedFileLinkAnnotation = document.Pages(1).Annotations(6) as PdfLoadedFileLinkAnnotation
'Sets the file link Annotation location
fileLinkAnnotation.Location =New PointF(100,100)
'Save the document.
document.Save("fileLinkAnnotation.pdf")
document.Close(True)
ModifiedDate
Gets or Sets the ModifiedDate of the annotation.
Declaration
public override DateTime ModifiedDate { get; set; }
Property Value
Type |
---|
System.DateTime |
Overrides
Name
Gets or sets the name of the annotation.
Declaration
public string Name { get; set; }
Property Value
Type |
---|
System.String |
Opacity
Gets or sets the Opacity of the annotation, Default value is 1.0f
Declaration
public override float Opacity { get; set; }
Property Value
Type |
---|
System.Single |
Overrides
Size
Gets or sets the size.
Declaration
public override SizeF Size { get; set; }
Property Value
Type |
---|
SizeF |
Overrides
Examples
//Load an existing document.
PdfLoadedDocument document = new PdfLoadedDocument(@"..\..\Annotations.pdf");
//Gets the annotation from loaded document.
PdfLoadedFileLinkAnnotation fileLinkAnnotation = document.Pages[1].Annotations[6] as PdfLoadedFileLinkAnnotation;
//Sets the size
attchmentAnnotation.Size=new SizeF(100,50)
//Save the document.
document.Save("fileLinkAnnotation.pdf");
document.Close(true);
'Load an existing document.
Dim document As New PdfLoadedDocument("..\..\Annotations.pdf")
'Gets the annotation from loaded document.
Dim fileLinkAnnotation As PdfLoadedFileLinkAnnotation = document.Pages(1).Annotations(6) as PdfLoadedFileLinkAnnotation
'Sets the size
attchmentAnnotation.Size=New SizeF(100,50)
'Save the document.
document.Save("fileLinkAnnotation.pdf")
document.Close(True)
Subject
Gets or Sets the Subject of the annotation.
Declaration
public override string Subject { get; set; }
Property Value
Type |
---|
System.String |
Overrides
Text
Gets or sets the text.
Declaration
public override string Text { get; set; }
Property Value
Type | Description |
---|---|
System.String | The text. |
Overrides
Examples
//Load an existing document.
PdfLoadedDocument document = new PdfLoadedDocument(@"..\..\Annotations.pdf");
//Gets the annotation from loaded document.
PdfLoadedFileLinkAnnotation fileLinkAnnotation = document.Pages[1].Annotations[6] as PdfLoadedFileLinkAnnotation;
//Sets the file link annotation text.
fileLinkAnnotation.Text = "File Link Annotation";
//Save the document.
document.Save("fileLinkAnnotation.pdf");
document.Close(true);
'Load an existing document.
Dim document As New PdfLoadedDocument("..\..\Annotations.pdf")
'Gets the annotation from loaded document.
Dim fileLinkAnnotation As PdfLoadedFileLinkAnnotation = document.Pages(1).Annotations(6) as PdfLoadedFileLinkAnnotation
'Sets the file link annotation text.
fileLinkAnnotation.Text = "File Link Annotation"
'Save the document.
document.Save("fileLinkAnnotation.pdf")
document.Close(True)
Methods
CheckFlatten()
Obtain annotation need flatten
Declaration
protected void CheckFlatten()
FlattenAnnotationTemplate(PdfTemplate, Boolean)
Flatten annotation template
Declaration
protected void FlattenAnnotationTemplate(PdfTemplate appearance, bool isNormalMatrix)
Parameters
Type | Name | Description |
---|---|---|
PdfTemplate | appearance | |
System.Boolean | isNormalMatrix |