Class PdfLoadedStyledAnnotation
- Namespace
- Syncfusion.Pdf.Interactive
- Assembly
- Syncfusion.Pdf.Portable.dll
Represents the PdfLoadedStyledAnnotation class
public class PdfLoadedStyledAnnotation : PdfLoadedAnnotation, INotifyPropertyChanged
- Inheritance
-
PdfLoadedStyledAnnotation
- Implements
- Derived
- Inherited Members
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.
public override PdfAnnotationFlags AnnotationFlags { get; set; }
Property Value
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.
public override string Author { get; set; }
Property Value
Border
Gets or sets the annotation's border.
public override PdfAnnotationBorder Border { get; set; }
Property Value
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.
public override RectangleF Bounds { get; set; }
Property Value
- RectangleF
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.
public override PdfColor Color { get; set; }
Property Value
- PdfColor
The color.
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
public override PdfColor InnerColor { get; set; }
Property Value
Location
Gets or sets the location.
public override PointF Location { get; set; }
Property Value
- PointF
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.
public override DateTime ModifiedDate { get; set; }
Property Value
Name
Gets or sets the name of the annotation.
public string Name { get; set; }
Property Value
Opacity
Gets or sets the Opacity of the annotation, Default value is 1.0f
public override float Opacity { get; set; }
Property Value
Size
Gets or sets the size.
public override SizeF Size { get; set; }
Property Value
- SizeF
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.
public override string Subject { get; set; }
Property Value
Text
Gets or sets the text.
public override string Text { get; set; }
Property Value
- string
The text.
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
protected void CheckFlatten()
FlattenAnnotationTemplate(PdfTemplate, bool)
Flatten annotation template
protected void FlattenAnnotationTemplate(PdfTemplate appearance, bool isNormalMatrix)
Parameters
appearance
PdfTemplateisNormalMatrix
bool