Table of Contents

Class Annotation

Namespace
iTextSharp.text
Assembly
iTextSharp.LGPLv2.Core.dll

An Annotation is a little note that can be added to a page on a document.

public class Annotation : IElement
Inheritance
Annotation
Implements
Inherited Members

Constructors

Annotation(float, float, float, float, int)

Constructs an Annotation.

public Annotation(float llx, float lly, float urx, float ury, int named)

Parameters

llx float

the lower left x-value

lly float

the lower left y-value

urx float

the upper right x-value

ury float

the upper right y-value

named int

a named destination in this file

Annotation(float, float, float, float, string)

Constructs an Annotation.

public Annotation(float llx, float lly, float urx, float ury, string url)

Parameters

llx float

the lower left x-value

lly float

the lower left y-value

urx float

the upper right x-value

ury float

the upper right y-value

url string

the external reference

Annotation(float, float, float, float, string, int)

Constructs an Annotation.

public Annotation(float llx, float lly, float urx, float ury, string file, int page)

Parameters

llx float

the lower left x-value

lly float

the lower left y-value

urx float

the upper right x-value

ury float

the upper right y-value

file string

an external PDF file

page int

a page number in this file

Annotation(float, float, float, float, string, string)

Constructs an Annotation.

public Annotation(float llx, float lly, float urx, float ury, string file, string dest)

Parameters

llx float

the lower left x-value

lly float

the lower left y-value

urx float

the upper right x-value

ury float

the upper right y-value

file string

an external PDF file

dest string

the destination in this file

Annotation(float, float, float, float, string, string, bool)

Creates a Screen anotation to embed media clips

public Annotation(float llx, float lly, float urx, float ury, string moviePath, string mimeType, bool showOnDisplay)

Parameters

llx float

the lower left x-value

lly float

the lower left y-value

urx float

the upper right x-value

ury float

the upper right y-value

moviePath string

path to the media clip file

mimeType string

mime type of the media

showOnDisplay bool

if true play on display of the page

Annotation(float, float, float, float, string, string, string, string)

Constructs an Annotation.

public Annotation(float llx, float lly, float urx, float ury, string application, string parameters, string operation, string defaultdir)

Parameters

llx float

the lower left x-value

lly float

the lower left y-value

urx float

the upper right x-value

ury float

the upper right y-value

application string

an external application

parameters string

parameters to pass to this application

operation string

the operation to pass to this application

defaultdir string

the default directory to run this application in

Annotation(float, float, float, float, Uri)

Constructs an Annotation.

public Annotation(float llx, float lly, float urx, float ury, Uri url)

Parameters

llx float

the lower left x-value

lly float

the lower left y-value

urx float

the upper right x-value

ury float

the upper right y-value

url Uri

the external reference

Annotation(string, string)

Constructs an Annotation with a certain title and some text.

public Annotation(string title, string text)

Parameters

title string

the title of the annotation

text string

the content of the annotation

Annotation(string, string, float, float, float, float)

Constructs an Annotation with a certain title and some text.

public Annotation(string title, string text, float llx, float lly, float urx, float ury)

Parameters

title string

the title of the annotation

text string

the content of the annotation

llx float

the lower left x-value

lly float

the lower left y-value

urx float

the upper right x-value

ury float

the upper right y-value

Annotation(Annotation)

constructors

public Annotation(Annotation an)

Parameters

an Annotation

Fields

APPLICATION

membervariables

public const string APPLICATION = "application"

Field Value

string

AnnotationAttributes

This is the title of the Annotation.

protected INullValueDictionary<string, object> AnnotationAttributes

Field Value

INullValueDictionary<string, object>

CONTENT

This is a possible attribute.

public const string CONTENT = "content"

Field Value

string

DEFAULTDIR

This is a possible attribute.

public const string DEFAULTDIR = "defaultdir"

Field Value

string

DESTINATION

This is a possible attribute.

public const string DESTINATION = "destination"

Field Value

string

FILE

This is a possible attribute.

public const string FILE = "file"

Field Value

string

FILE_DEST

This is a possible annotation type.

public const int FILE_DEST = 3

Field Value

int

FILE_PAGE

This is a possible annotation type.

public const int FILE_PAGE = 4

Field Value

int

LAUNCH

This is a possible annotation type.

public const int LAUNCH = 6

Field Value

int

LLX

This is a possible attribute.

public const string LLX = "llx"

Field Value

string

LLY

This is a possible attribute.

public const string LLY = "lly"

Field Value

string

MIMETYPE

This is a possible attribute.

public const string MIMETYPE = "mime"

Field Value

string

NAMED

This is a possible attribute.

public const string NAMED = "named"

Field Value

string

NAMED_DEST

This is a possible annotation type.

public const int NAMED_DEST = 5

Field Value

int

OPERATION

This is a possible attribute.

public const string OPERATION = "operation"

Field Value

string

PAGE

This is a possible attribute.

public const string PAGE = "page"

Field Value

string

PARAMETERS

This is a possible attribute.

public const string PARAMETERS = "parameters"

Field Value

string

SCREEN

This is a possible annotation type.

public const int SCREEN = 7

Field Value

int

TEXT

This is a possible annotation type.

public const int TEXT = 0

Field Value

int

TITLE

This is a possible attribute.

public const string TITLE = "title"

Field Value

string

URL

This is a possible attribute.

public const string URL = "url"

Field Value

string

URL_AS_STRING

This is a possible annotation type.

public const int URL_AS_STRING = 2

Field Value

int

URL_NET

This is a possible annotation type.

public const int URL_NET = 1

Field Value

int

URX

This is a possible attribute.

public const string URX = "urx"

Field Value

string

URY

This is a possible attribute.

public const string URY = "ury"

Field Value

string

Properties

AnnotationType

implementation of the Element-methods

public int AnnotationType { get; }

Property Value

int

a type

Attributes

Gets the content of this Annotation.

public INullValueDictionary<string, object> Attributes { get; }

Property Value

INullValueDictionary<string, object>

a reference

Chunks

Gets all the chunks in this element.

public IList<Chunk> Chunks { get; }

Property Value

IList<Chunk>

an ArrayList

Content

Gets the content of this Annotation.

public string Content { get; }

Property Value

string

a reference

Title

Returns the title of this Annotation.

public string Title { get; }

Property Value

string

a name

Type

Gets the type of the text element

public int Type { get; }

Property Value

int

Methods

GetLlx()

methods

public float GetLlx()

Returns

float

a value

GetLlx(float)

Returns the lower left x-value.

public float GetLlx(float def)

Parameters

def float

the default value

Returns

float

a value

GetLly()

methods to retrieve information

public float GetLly()

Returns

float

a value

GetLly(float)

Returns the lower left y-value.

public float GetLly(float def)

Parameters

def float

the default value

Returns

float

a value

GetUrx()

Returns the uppper right x-value.

public float GetUrx()

Returns

float

a value

GetUrx(float)

Returns the upper right x-value.

public float GetUrx(float def)

Parameters

def float

the default value

Returns

float

a value

GetUry()

Returns the uppper right y-value.

public float GetUry()

Returns

float

a value

GetUry(float)

Returns the upper right y-value.

public float GetUry(float def)

Parameters

def float

the default value

Returns

float

a value

IsContent()

@see com.lowagie.text.Element#isContent() @since iText 2.0.8

public bool IsContent()

Returns

bool

IsNestable()

@see com.lowagie.text.Element#isNestable() @since iText 2.0.8

public bool IsNestable()

Returns

bool

Process(IElementListener)

Processes the element by adding it (or the different parts) to an IElementListener.

public bool Process(IElementListener listener)

Parameters

listener IElementListener

an IElementListener

Returns

bool

true if the element was process successfully

SetDimensions(float, float, float, float)

methods

public void SetDimensions(float llx, float lly, float urx, float ury)

Parameters

llx float

the lower left x-value

lly float

the lower left y-value

urx float

the upper right x-value

ury float

the upper right y-value