Table of Contents

Class PdfFormField

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

Implements form fields. @author Paulo Soares (psoares@consiste.pt)

public class PdfFormField : PdfAnnotation
Inheritance
PdfFormField
Inherited Members

Constructors

PdfFormField(PdfWriter, float, float, float, float, PdfAction)

Constructs a new PdfAnnotation of subtype link (Action).

public PdfFormField(PdfWriter writer, float llx, float lly, float urx, float ury, PdfAction action)

Parameters

writer PdfWriter
llx float
lly float
urx float
ury float
action PdfAction

Fields

FF_COMB

public const int FF_COMB = 16777216

Field Value

int

FF_COMBO

public const int FF_COMBO = 131072

Field Value

int

FF_DONOTSCROLL

public const int FF_DONOTSCROLL = 8388608

Field Value

int

FF_DONOTSPELLCHECK

public const int FF_DONOTSPELLCHECK = 4194304

Field Value

int

FF_EDIT

public const int FF_EDIT = 262144

Field Value

int

FF_FILESELECT

public const int FF_FILESELECT = 1048576

Field Value

int

FF_MULTILINE

public const int FF_MULTILINE = 4096

Field Value

int

FF_MULTISELECT

public const int FF_MULTISELECT = 2097152

Field Value

int

FF_NO_EXPORT

public const int FF_NO_EXPORT = 4

Field Value

int

FF_NO_TOGGLE_TO_OFF

public const int FF_NO_TOGGLE_TO_OFF = 16384

Field Value

int

FF_PASSWORD

public const int FF_PASSWORD = 8192

Field Value

int

FF_PUSHBUTTON

public const int FF_PUSHBUTTON = 65536

Field Value

int

FF_RADIO

public const int FF_RADIO = 32768

Field Value

int

FF_RADIOSINUNISON

public const int FF_RADIOSINUNISON = 33554432

Field Value

int

FF_READ_ONLY

public const int FF_READ_ONLY = 1

Field Value

int

FF_REQUIRED

public const int FF_REQUIRED = 2

Field Value

int

IfScaleAlways

public static readonly PdfName IfScaleAlways

Field Value

PdfName

IfScaleAnamorphic

public static readonly PdfName IfScaleAnamorphic

Field Value

PdfName

IfScaleBigger

public static readonly PdfName IfScaleBigger

Field Value

PdfName

IfScaleNever

public static readonly PdfName IfScaleNever

Field Value

PdfName

IfScaleProportional

public static readonly PdfName IfScaleProportional

Field Value

PdfName

IfScaleSmaller

public static readonly PdfName IfScaleSmaller

Field Value

PdfName

MK_CAPTION_ABOVE

public const int MK_CAPTION_ABOVE = 3

Field Value

int

MK_CAPTION_BELOW

public const int MK_CAPTION_BELOW = 2

Field Value

int

MK_CAPTION_LEFT

public const int MK_CAPTION_LEFT = 5

Field Value

int

MK_CAPTION_OVERLAID

public const int MK_CAPTION_OVERLAID = 6

Field Value

int

MK_CAPTION_RIGHT

public const int MK_CAPTION_RIGHT = 4

Field Value

int

MK_NO_CAPTION

public const int MK_NO_CAPTION = 1

Field Value

int

MK_NO_ICON

public const int MK_NO_ICON = 0

Field Value

int

MULTILINE

public const bool MULTILINE = true

Field Value

bool

MergeTarget

public static PdfName[] MergeTarget

Field Value

PdfName[]

PASSWORD

public const bool PASSWORD = true

Field Value

bool

PLAINTEXT

public const bool PLAINTEXT = false

Field Value

bool

Q_CENTER

public const int Q_CENTER = 1

Field Value

int

Q_LEFT

public const int Q_LEFT = 0

Field Value

int

Q_RIGHT

public const int Q_RIGHT = 2

Field Value

int

SINGLELINE

public const bool SINGLELINE = false

Field Value

bool

Properties

Button

public int Button { set; }

Property Value

int

DefaultValueAsName

public string DefaultValueAsName { set; }

Property Value

string

DefaultValueAsString

public string DefaultValueAsString { set; }

Property Value

string

FieldName

public string FieldName { set; }

Property Value

string

Kids

public IList<PdfFormField> Kids { get; }

Property Value

IList<PdfFormField>

MappingName

public string MappingName { set; }

Property Value

string

Parent

Getter for property parent.

public PdfFormField Parent { get; }

Property Value

PdfFormField

Value of property parent.

Quadding

public int Quadding { set; }

Property Value

int

UserName

public string UserName { set; }

Property Value

string

ValueAsName

public string ValueAsName { set; }

Property Value

string

ValueAsSig

public PdfSignature ValueAsSig { set; }

Property Value

PdfSignature

ValueAsString

public string ValueAsString { set; }

Property Value

string

Methods

AddKid(PdfFormField)

public void AddKid(PdfFormField field)

Parameters

field PdfFormField

CreateButton(PdfWriter, int)

protected static PdfFormField CreateButton(PdfWriter writer, int flags)

Parameters

writer PdfWriter
flags int

Returns

PdfFormField

CreateCheckBox(PdfWriter)

public static PdfFormField CreateCheckBox(PdfWriter writer)

Parameters

writer PdfWriter

Returns

PdfFormField

CreateChoice(PdfWriter, int, PdfArray, int)

protected static PdfFormField CreateChoice(PdfWriter writer, int flags, PdfArray options, int topIndex)

Parameters

writer PdfWriter
flags int
options PdfArray
topIndex int

Returns

PdfFormField

CreateCombo(PdfWriter, bool, string[,], int)

public static PdfFormField CreateCombo(PdfWriter writer, bool edit, string[,] options, int topIndex)

Parameters

writer PdfWriter
edit bool
options string[,]
topIndex int

Returns

PdfFormField

CreateCombo(PdfWriter, bool, string[], int)

public static PdfFormField CreateCombo(PdfWriter writer, bool edit, string[] options, int topIndex)

Parameters

writer PdfWriter
edit bool
options string[]
topIndex int

Returns

PdfFormField

CreateEmpty(PdfWriter)

public static PdfFormField CreateEmpty(PdfWriter writer)

Parameters

writer PdfWriter

Returns

PdfFormField

CreateList(PdfWriter, string[,], int)

public static PdfFormField CreateList(PdfWriter writer, string[,] options, int topIndex)

Parameters

writer PdfWriter
options string[,]
topIndex int

Returns

PdfFormField

CreateList(PdfWriter, string[], int)

public static PdfFormField CreateList(PdfWriter writer, string[] options, int topIndex)

Parameters

writer PdfWriter
options string[]
topIndex int

Returns

PdfFormField

CreatePushButton(PdfWriter)

public static PdfFormField CreatePushButton(PdfWriter writer)

Parameters

writer PdfWriter

Returns

PdfFormField

CreateRadioButton(PdfWriter, bool)

public static PdfFormField CreateRadioButton(PdfWriter writer, bool noToggleToOff)

Parameters

writer PdfWriter
noToggleToOff bool

Returns

PdfFormField

CreateSignature(PdfWriter)

public static PdfFormField CreateSignature(PdfWriter writer)

Parameters

writer PdfWriter

Returns

PdfFormField

CreateTextField(PdfWriter, bool, bool, int)

public static PdfFormField CreateTextField(PdfWriter writer, bool multiline, bool password, int maxLen)

Parameters

writer PdfWriter
multiline bool
password bool
maxLen int

Returns

PdfFormField

ProcessOptions(string[,])

protected static PdfArray ProcessOptions(string[,] options)

Parameters

options string[,]

Returns

PdfArray

ProcessOptions(string[])

protected static PdfArray ProcessOptions(string[] options)

Parameters

options string[]

Returns

PdfArray

SetFieldFlags(int)

public int SetFieldFlags(int flags)

Parameters

flags int

Returns

int

SetUsed()

public override void SetUsed()

SetWidget(Rectangle, PdfName)

public void SetWidget(Rectangle rect, PdfName highlight)

Parameters

rect Rectangle
highlight PdfName