cete.dynamicpdf.pageelements.note
Note
- Namespace: ceTe.DynamicPDF.PageElements
- Assemblies: ceTe.DynamicPDF.40.dll
Represents a note annotation.
public class Note : TaggablePageElement, IAnnotation, IArea, ICoordinate, ISerializable
Public Class Note
Inherits TaggablePageElement
Implements IAnnotation, IArea, ICoordinate, ISerializable
Inheritance: Object → PageElement → TaggablePageElement → Note
Implements: IAnnotation, IArea, ICoordinate, ISerializable
Licensing
This class is a DynamicPDF Generator Professional Edition feature. One of the following licenses is required for non-evaluation usage:
- DynamicPDF Generator for .NET Professional Edition
- DynamicPDF Generator for .NET Enterprise Edition
- DynamicPDF Merger for .NET Professional Edition
- DynamicPDF Merger for .NET Enterprise Edition
- DynamicPDF ReportWriter for .NET Professional Edition
- DynamicPDF ReportWriter for .NET Enterprise Edition
- DynamicPDF Core Suite for .NET Professional Edition
- DynamicPDF Core Suite for .NET Enterprise Edition
Examples
The following example will place an icon on the PDF that once clicked, will display text in a separate box.
NOTE: This page element cannot be used within a table cell, or tranformation group.
Imports System
Imports ceTe.DynamicPDF
Imports ceTe.DynamicPDF.PageElements
Module MyModule Sub Main() ' Create a PDF Document Dim MyDocument As Document = New Document ' Create a Page and add it to the document Dim MyPage As Page = New Page MyDocument.Pages.Add(MyPage)
' Create a note Dim MyNote As Note = New Note("This is my help note.", 50, 50, _ 150, 50, NoteType.Help, False)
' Change the color property MyNote.Color = RgbColor.Red
' Add the note to the page MyPage.Elements.Add(MyNote) MyPage.Elements.Add(New Label("Click on the above icon to view " + _ "the note.", 50, 80, 150, 72, Font.HelveticaBold, 18))
' Save the PDF MyDocument.Draw("C:\MyDocument.pdf") End Sub
End Module
using System;
using ceTe.DynamicPDF;
using ceTe.DynamicPDF.PageElements;
class MyClass
{static void Main(){ // Create a PDF Document Document document = new Document();
// Create a Page and add it to the document Page page = new Page(); document.Pages.Add( page );
// Create a note Note note = new Note( "This is my help note.", 50, 50, 150, 50, NoteType.Help, true );
// Change the color property note.Color = RgbColor.Red;
// Add the note to the page page.Elements.Add( note ); page.Elements.Add( new Label( "Click on the above icon to view " + "the note.", 50, 80, 150, 72, Font.HelveticaBold, 18 ) );
// Save the PDF document.Draw( @"C:\MyDocument.pdf" );}
}
Remarks
This class can be used to place a note annotation on the PDF.
Constructors
Note(String, Single, Single, Single, Single)
Initializes a new instance of the Note class.
public Note(string text, float x, float y, float width, float height)
Public Sub New (text As String, x As Single, y As Single, width As Single, height As Single)
Parameters
- text: String
Text of the note.
- x: Single
X coordinate of the note.
- y: Single
Y coordinate of the note.
- width: Single
Width of the note.
- height: Single
Height of the note.
Note(String, Single, Single, Single, Single, Boolean)
Initializes a new instance of the Note class.
public Note(string text, float x, float y, float width, float height, bool isOpen)
Public Sub New (text As String, x As Single, y As Single, width As Single, height As Single, isOpen As Boolean)
Parameters
- text: String
Text of the note.
- x: Single
X coordinate of the note.
- y: Single
Y coordinate of the note.
- width: Single
Width of the note.
- height: Single
Height of the note.
- isOpen: Boolean
Specifies if the note is open initially.
Note(String, Single, Single, Single, Single, NoteType)
Initializes a new instance of the Note class.
public Note(string text, float x, float y, float width, float height, NoteType type)
Public Sub New (text As String, x As Single, y As Single, width As Single, height As Single, type As NoteType)
Parameters
- text: String
Text of the note.
- x: Single
X coordinate of the note.
- y: Single
Y coordinate of the note.
- width: Single
Width of the note.
- height: Single
Height of the note.
- type: NoteType
Specifies the type of note.
Note(String, Single, Single, Single, Single, NoteType, Boolean)
Initializes a new instance of the Note class.
public Note(string text, float x, float y, float width, float height, NoteType type, bool isOpen)
Public Sub New (text As String, x As Single, y As Single, width As Single, height As Single, type As NoteType, isOpen As Boolean)
Parameters
- text: String
Text of the note.
- x: Single
X coordinate of the note.
- y: Single
Y coordinate of the note.
- width: Single
Width of the note.
- height: Single
Height of the note.
- type: NoteType
Specifies the type of note.
- isOpen: Boolean
Specifies if the note is open initially.
Properties
Color
Gets or sets the color of the note.
public RgbColor Color { get; set; }
Public Property Color As RgbColor
Property Value
Height
Gets or sets the height of the link.
public float Height { get; set; }
Public Property Height As Single
Property Value
ID
Gets or sets the ID of the page element. (Inherited from PageElement)
public string ID { get; set; }
Public Property ID As String
Property Value
IsOpen
Gets or sets a value indicating if the note is opened by default.
public bool IsOpen { get; set; }
Public Property IsOpen As Boolean
Property Value
NoteType
Gets or sets the type of note.
public NoteType NoteType { get; set; }
Public Property NoteType As NoteType
Property Value
Tag
Gets or sets the structure element of the note.
public Tag Tag { get; set; }
Public Property Tag As Tag
Property Value
Licensing
This property is a DynamicPDF Generator Enterprise Edition feature. One of the following licenses is required for non-evaluation usage:
- DynamicPDF Generator for .NET Enterprise Edition
- DynamicPDF Merger for .NET Enterprise Edition
- DynamicPDF ReportWriter for .NET Enterprise Edition
- DynamicPDF Core Suite for .NET Enterprise Edition
TagOrder
Gets or sets the tag order of the taggable element. (Inherited from TaggablePageElement)
public int TagOrder { get; set; }
Public Property TagOrder As Int32
Property Value
Text
Gets or sets the text of the note.
public string Text { get; set; }
Public Property Text As String
Property Value
Width
Gets or sets the width of the link.
public float Width { get; set; }
Public Property Width As Single
Property Value
X
Gets or sets the X coordinate of the link.
public float X { get; set; }
Public Property X As Single
Property Value
Y
Gets or sets the Y coordinate of the link.
public float Y { get; set; }
Public Property Y As Single
Property Value
Methods
Draw(PageWriter)
Draws the link to the given PageWriter object.
public void Draw(PageWriter writer)
Sub Draw(writer As PageWriter)
Parameters
- writer: PageWriter
PageWriter object to receive the link's output.
DrawAnnotation(DocumentWriter)
Draws the link to the given DocumentWriter object.
public void DrawAnnotation(DocumentWriter writer)
Sub DrawAnnotation(writer As DocumentWriter)
Parameters
- writer: DocumentWriter
DocumentWriter object to receive the link's output.
Equals(Object)
Determines whether the specified Object is equal to the current Object . (Inherited from Object)
public bool Equals(Object obj)
Function Equals(obj As Object) As Boolean
Parameters
- obj: Object
The Object to compare with the current Object .
Returns
true if the specified Object is equal to the current Object ; otherwise, false.
GetHashCode()
Serves as a hash function for a particular type. (Inherited from Object)
public int GetHashCode()
Function GetHashCode() As Integer
Returns
A hash code for the current Object .
GetType()
Gets the Type of the current instance. (Inherited from Object)
public Type GetType()
Function GetType() As Type
Returns
The Type instance that represents the exact runtime type of the current instance.
ToString()
Returns a String that represents the current Object . (Inherited from Object)
public string ToString()
Function ToString() As String
Returns
A String that represents the current Object .