Class PdfLoadedFileLinkAnnotation
Represents the loaded file link annotation class.
Inheritance
System.Object
PdfLoadedFileLinkAnnotation
Implements
System.ComponentModel.INotifyPropertyChanged
Inherited Members
Namespace: Syncfusion.Pdf.Interactive
Assembly: Syncfusion.Pdf.NET.dll
Syntax
public class PdfLoadedFileLinkAnnotation : PdfLoadedStyledAnnotation, 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;
//Gets the annotation flags
PdfAnnotationFlags flag = attchmentAnnotation.AnnotationFlags;
//Sets the file name.
fileLinkAnnotation.FileName = @"..\..\Data\Manual.txt";
//Gets the file link annotation border.
PdfAnnotationBorder border = fileLinkAnnotation.Border;
//Gets the file link annotation bounds.
RectangleF rectangle = fileLinkAnnotation.Bounds;
//Gets the file link annotation bounds.
PdfColor color = fileLinkAnnotation.Color;
//Gets the file link annotation location.
PointF point = fileLinkAnnotation.Location;
//Gets the file link annotation size.
SizeF size = fileLinkAnnotation.Size;
//Gets the file link annotation text.
string text = fileLinkAnnotation.Text;
//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 name.
fileLinkAnnotation.FileName = "..\..\Data\Manual.txt"
'Gets the annotation flags
Dim flag As PdfAnnotationFlags = fileLinkAnnotation.AnnotationFlags
'Gets the file link annotation border.
Dim border As PdfAnnotationBorder = fileLinkAnnotation.Border
'Gets the file link annotation bounds.
Dim rectangle As RectangleF = fileLinkAnnotation.Bounds
'Gets the file link annotation bounds.
Dim color As PdfColor = fileLinkAnnotation.Color
'Gets the file link annotation location.
Dim point As PointF = fileLinkAnnotation.Location
'Gets the file link annotation size.
Dim size As SizeF = fileLinkAnnotation.Size
'Gets the file link annotation text.
Dim text As string = fileLinkAnnotation.Text
'Save the document.
document.Save("fileLinkAnnotation.pdf")
document.Close(True)
Properties
DestinationArray
Gets or sets the destination array of the annotation, the destination array contains page number and positions.
Declaration
public int[] DestinationArray { get; set; }
Property Value
Type |
---|
System.Int32[] |
Examples
//Load an existing document.
PdfLoadedDocument document = new PdfLoadedDocument(@"..\..\Annotations.pdf");
//Gets the annotation from loaded document.
PdfLoadedFileLinkAnnotation linkAnnotation = lDoc.Pages[1].Annotations[2] as PdfLoadedFileLinkAnnotation;
//Assign DestinationArray[pagenumber,xaxis,yaxis]
int[] array = new int[3] { 2, 750, 0 };
linkAnnotation.DestinationArray = array;
//Save the document.
document.Save("lineAnnotation.pdf");
document.Close(true);
'Load an existing document.
Dim document As New PdfLoadedDocument("..\..\Annotations.pdf")
'Gets the annotation from loaded document.
Dim linkAnnotation As PdfLoadedFileLinkAnnotation = lDoc.Pages(1).Annotations(2) as PdfLoadedFileLinkAnnotation
'Assign DestinationArray[pagenumber,xaxis,yaxis]
Dim array As Integer() = New Integer(2) {2, 750, 0}
linkAnnotation.DestinationArray = array
'Save the document.
document.Save("lineAnnotation.pdf")
document.Close(True)
FileName
Declaration
public string FileName { get; set; }
Property Value
Type |
---|
System.String |
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;
//Gets the annotation flags
PdfAnnotationFlags flag = attchmentAnnotation.AnnotationFlags;
//Sets the file name.
fileLinkAnnotation.FileName = @"..\..\Data\Manual.txt";
//Gets the file link annotation border.
//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 name.
fileLinkAnnotation.FileName = "..\..\Data\Manual.txt"
'Save the document.
document.Save("fileLinkAnnotation.pdf")
document.Close(True)
Methods
Save()
Declaration
protected override void Save()
Overrides
Implements
System.ComponentModel.INotifyPropertyChanged