Class PdfAnnotation
- Namespace
- iTextSharp.text.pdf
- Assembly
- iTextSharp.LGPLv2.Core.dll
A PdfAnnotation is a note that is associated with a page. @see PdfDictionary
public class PdfAnnotation : PdfDictionary
- Inheritance
-
PdfAnnotation
- Derived
- Inherited Members
Constructors
PdfAnnotation(PdfWriter, float, float, float, float, PdfAction)
Constructs a new PdfAnnotation of subtype link (Action).
public PdfAnnotation(PdfWriter writer, float llx, float lly, float urx, float ury, PdfAction action)
Parameters
PdfAnnotation(PdfWriter, float, float, float, float, PdfString, PdfString)
Constructs a new PdfAnnotation of subtype text.
public PdfAnnotation(PdfWriter writer, float llx, float lly, float urx, float ury, PdfString title, PdfString content)
Parameters
PdfAnnotation(PdfWriter, Rectangle)
constructors
public PdfAnnotation(PdfWriter writer, Rectangle rect)
Parameters
Fields
AaBlur
public static readonly PdfName AaBlur
Field Value
AaDown
public static readonly PdfName AaDown
Field Value
AaEnter
public static readonly PdfName AaEnter
Field Value
AaExit
public static readonly PdfName AaExit
Field Value
AaFocus
public static readonly PdfName AaFocus
Field Value
AaJsChange
public static readonly PdfName AaJsChange
Field Value
AaJsFormat
public static readonly PdfName AaJsFormat
Field Value
AaJsKey
public static readonly PdfName AaJsKey
Field Value
AaJsOtherChange
public static readonly PdfName AaJsOtherChange
Field Value
AaUp
public static readonly PdfName AaUp
Field Value
Annotation
protected bool Annotation
Field Value
AppearanceDown
public static readonly PdfName AppearanceDown
Field Value
AppearanceNormal
public static readonly PdfName AppearanceNormal
Field Value
AppearanceRollover
public static readonly PdfName AppearanceRollover
Field Value
FLAGS_HIDDEN
public const int FLAGS_HIDDEN = 2
Field Value
FLAGS_INVISIBLE
public const int FLAGS_INVISIBLE = 1
Field Value
FLAGS_LOCKED
public const int FLAGS_LOCKED = 128
Field Value
FLAGS_NOROTATE
public const int FLAGS_NOROTATE = 16
Field Value
FLAGS_NOVIEW
public const int FLAGS_NOVIEW = 32
Field Value
FLAGS_NOZOOM
public const int FLAGS_NOZOOM = 8
Field Value
FLAGS_PRINT
public const int FLAGS_PRINT = 4
Field Value
FLAGS_READONLY
public const int FLAGS_READONLY = 64
Field Value
FLAGS_TOGGLENOVIEW
public const int FLAGS_TOGGLENOVIEW = 256
Field Value
Form
protected bool Form
Field Value
HighlightInvert
public static readonly PdfName HighlightInvert
Field Value
HighlightNone
public static readonly PdfName HighlightNone
Field Value
HighlightOutline
public static readonly PdfName HighlightOutline
Field Value
HighlightPush
public static readonly PdfName HighlightPush
Field Value
HighlightToggle
public static readonly PdfName HighlightToggle
Field Value
MARKUP_HIGHLIGHT
public const int MARKUP_HIGHLIGHT = 0
Field Value
MARKUP_SQUIGGLY
attributevalue
public const int MARKUP_SQUIGGLY = 3
Field Value
MARKUP_STRIKEOUT
public const int MARKUP_STRIKEOUT = 2
Field Value
MARKUP_UNDERLINE
public const int MARKUP_UNDERLINE = 1
Field Value
Reference
protected PdfIndirectReference Reference
Field Value
Used
Holds value of property used.
protected bool Used
Field Value
Writer
protected PdfWriter Writer
Field Value
templates
protected INullValueDictionary<PdfTemplate, object> templates
Field Value
Properties
Action
public PdfAction Action { set; }
Property Value
AppearanceState
public string AppearanceState { set; }
Property Value
Border
public PdfBorderArray Border { set; }
Property Value
BorderStyle
public PdfBorderDictionary BorderStyle { set; }
Property Value
Color
public BaseColor Color { set; }
Property Value
DefaultAppearanceString
public PdfContentByte DefaultAppearanceString { set; }
Property Value
Flags
public int Flags { set; }
Property Value
IndirectReference
public PdfIndirectReference IndirectReference { get; }
Property Value
Layer
Sets the layer this annotation belongs to.
public IPdfOcg Layer { set; }
Property Value
MkAlternateCaption
public string MkAlternateCaption { set; }
Property Value
MkAlternateIcon
public PdfTemplate MkAlternateIcon { set; }
Property Value
MkBackgroundColor
public BaseColor MkBackgroundColor { set; }
Property Value
MkBorderColor
public BaseColor MkBorderColor { set; }
Property Value
MkNormalCaption
public string MkNormalCaption { set; }
Property Value
MkNormalIcon
public PdfTemplate MkNormalIcon { set; }
Property Value
MkRolloverCaption
public string MkRolloverCaption { set; }
Property Value
MkRolloverIcon
public PdfTemplate MkRolloverIcon { set; }
Property Value
MkRotation
public int MkRotation { set; }
Property Value
MkTextPosition
public int MkTextPosition { set; }
Property Value
Name
Sets the name of the annotation. With this name the annotation can be identified among all the annotations on a page (it has to be unique).
public string Name { set; }
Property Value
Page
public int Page { set; }
Property Value
PlaceInPage
Getter for property placeInPage.
public int PlaceInPage { get; set; }
Property Value
- int
Value of property placeInPage.
Popup
public PdfAnnotation Popup { set; }
Property Value
Rotate
public int Rotate { set; }
Property Value
Templates
public INullValueDictionary<PdfTemplate, object> Templates { get; }
Property Value
Title
public string Title { set; }
Property Value
Methods
CreateFileAttachment(PdfWriter, Rectangle, string, byte[], string, string)
Creates a file attachment annotation. the file will be read from the disk fileStore is not null @throws IOException on error
public static PdfAnnotation CreateFileAttachment(PdfWriter writer, Rectangle rect, string contents, byte[] fileStore, string file, string fileDisplay)
Parameters
writer
PdfWriterthe PdfWriter
rect
Rectanglethe dimensions in the page of the annotation
contents
stringthe file description
fileStore
byte[]an array with the file. If it's null
file
stringthe path to the file. It will only be used if
fileDisplay
stringthe actual file name stored in the pdf
Returns
- PdfAnnotation
the annotation
CreateFileAttachment(PdfWriter, Rectangle, string, PdfFileSpecification)
Creates a file attachment annotation @throws IOException
public static PdfAnnotation CreateFileAttachment(PdfWriter writer, Rectangle rect, string contents, PdfFileSpecification fs)
Parameters
writer
PdfWriterrect
Rectanglecontents
stringfs
PdfFileSpecification
Returns
- PdfAnnotation
the annotation
CreateFreeText(PdfWriter, Rectangle, string, PdfContentByte)
public static PdfAnnotation CreateFreeText(PdfWriter writer, Rectangle rect, string contents, PdfContentByte defaultAppearance)
Parameters
writer
PdfWriterrect
Rectanglecontents
stringdefaultAppearance
PdfContentByte
Returns
CreateInk(PdfWriter, Rectangle, string, float[][])
public static PdfAnnotation CreateInk(PdfWriter writer, Rectangle rect, string contents, float[][] inkList)
Parameters
Returns
CreateLine(PdfWriter, Rectangle, string, float, float, float, float)
public static PdfAnnotation CreateLine(PdfWriter writer, Rectangle rect, string contents, float x1, float y1, float x2, float y2)
Parameters
Returns
CreateLink(PdfWriter, Rectangle, PdfName)
protected static PdfAnnotation CreateLink(PdfWriter writer, Rectangle rect, PdfName highlight)
Parameters
Returns
CreateLink(PdfWriter, Rectangle, PdfName, int, PdfDestination)
public static PdfAnnotation CreateLink(PdfWriter writer, Rectangle rect, PdfName highlight, int page, PdfDestination dest)
Parameters
writer
PdfWriterrect
Rectanglehighlight
PdfNamepage
intdest
PdfDestination
Returns
CreateLink(PdfWriter, Rectangle, PdfName, string)
public static PdfAnnotation CreateLink(PdfWriter writer, Rectangle rect, PdfName highlight, string namedDestination)
Parameters
Returns
CreateLink(PdfWriter, Rectangle, PdfName, PdfAction)
public static PdfAnnotation CreateLink(PdfWriter writer, Rectangle rect, PdfName highlight, PdfAction action)
Parameters
Returns
CreateMarkup(PdfWriter, Rectangle, string, int, float[])
public static PdfAnnotation CreateMarkup(PdfWriter writer, Rectangle rect, string contents, int type, float[] quadPoints)
Parameters
Returns
CreatePopup(PdfWriter, Rectangle, string, bool)
public static PdfAnnotation CreatePopup(PdfWriter writer, Rectangle rect, string contents, bool open)
Parameters
Returns
CreateScreen(PdfWriter, Rectangle, string, PdfFileSpecification, string, bool)
Creates a screen PdfAnnotation @throws IOException
public static PdfAnnotation CreateScreen(PdfWriter writer, Rectangle rect, string clipTitle, PdfFileSpecification fs, string mimeType, bool playOnDisplay)
Parameters
writer
PdfWriterrect
RectangleclipTitle
stringfs
PdfFileSpecificationmimeType
stringplayOnDisplay
bool
Returns
- PdfAnnotation
a screen PdfAnnotation
CreateSquareCircle(PdfWriter, Rectangle, string, bool)
public static PdfAnnotation CreateSquareCircle(PdfWriter writer, Rectangle rect, string contents, bool square)
Parameters
Returns
CreateStamp(PdfWriter, Rectangle, string, string)
public static PdfAnnotation CreateStamp(PdfWriter writer, Rectangle rect, string contents, string name)
Parameters
Returns
CreateText(PdfWriter, Rectangle, string, string, bool, string)
public static PdfAnnotation CreateText(PdfWriter writer, Rectangle rect, string title, string contents, bool open, string icon)
Parameters
Returns
GetMkColor(BaseColor)
public static PdfArray GetMkColor(BaseColor color)
Parameters
color
BaseColor
Returns
IsAnnotation()
Getter for property annotation.
public bool IsAnnotation()
Returns
- bool
Value of property annotation.
IsForm()
Getter for property form.
public bool IsForm()
Returns
- bool
Value of property form.
SetAdditionalActions(PdfName, PdfAction)
public void SetAdditionalActions(PdfName key, PdfAction action)
Parameters
SetAppearance(PdfName, string, PdfTemplate)
public void SetAppearance(PdfName ap, string state, PdfTemplate template)
Parameters
ap
PdfNamestate
stringtemplate
PdfTemplate
SetAppearance(PdfName, PdfTemplate)
public void SetAppearance(PdfName ap, PdfTemplate template)
Parameters
ap
PdfNametemplate
PdfTemplate
SetHighlighting(PdfName)
Sets the annotation's highlighting mode. The values can be HIGHLIGHT_NONE , HIGHLIGHT_INVERT , HIGHLIGHT_OUTLINE and HIGHLIGHT_PUSH ;
public void SetHighlighting(PdfName highlight)
Parameters
highlight
PdfNamethe annotation's highlighting mode
SetMkIconFit(PdfName, PdfName, float, float, bool)
public void SetMkIconFit(PdfName scale, PdfName scalingType, float leftoverLeft, float leftoverBottom, bool fitInBounds)
Parameters
SetPage()
public void SetPage()
SetUsed()
public virtual void SetUsed()
ShallowDuplicate(PdfAnnotation)
public static PdfAnnotation ShallowDuplicate(PdfAnnotation annot)
Parameters
annot
PdfAnnotation