HiraokaHyperTools.iTextSharp-LGPL  0.2.5
iTextSharp.text.pdf.BaseField Class Reference
Inheritance diagram for iTextSharp.text.pdf.BaseField:
iTextSharp.text.pdf.PushbuttonField iTextSharp.text.pdf.RadioCheckField iTextSharp.text.pdf.TextField

Public Member Functions

 BaseField (PdfWriter writer, Rectangle box, String fieldName)
 
void SetRotationFromPage (Rectangle page)
 

Static Public Member Functions

static void MoveFields (PdfDictionary from, PdfDictionary to)
 

Static Public Attributes

const float BORDER_WIDTH_THIN = 1
 
const float BORDER_WIDTH_MEDIUM = 2
 
const float BORDER_WIDTH_THICK = 3
 
const int VISIBLE = 0
 
const int HIDDEN = 1
 
const int VISIBLE_BUT_DOES_NOT_PRINT = 2
 
const int HIDDEN_BUT_PRINTABLE = 3
 
const int READ_ONLY = PdfFormField.FF_READ_ONLY
 
const int REQUIRED = PdfFormField.FF_REQUIRED
 
const int MULTILINE = PdfFormField.FF_MULTILINE
 
const int DO_NOT_SCROLL = PdfFormField.FF_DONOTSCROLL
 
const int PASSWORD = PdfFormField.FF_PASSWORD
 
const int FILE_SELECTION = PdfFormField.FF_FILESELECT
 
const int DO_NOT_SPELL_CHECK = PdfFormField.FF_DONOTSPELLCHECK
 
const int EDIT = PdfFormField.FF_EDIT
 
const int COMB = PdfFormField.FF_COMB
 

Protected Member Functions

PdfAppearance GetBorderAppearance ()
 

Static Protected Member Functions

static ArrayList GetHardBreaks (String text)
 
static void TrimRight (StringBuilder buf)
 
static ArrayList BreakLines (ArrayList breaks, BaseFont font, float fontSize, float width)
 

Protected Attributes

float borderWidth = BORDER_WIDTH_THIN
 
int borderStyle = PdfBorderDictionary.STYLE_SOLID
 
Color borderColor
 
Color backgroundColor
 
Color textColor
 
BaseFont font
 
float fontSize = 0
 
int alignment = Element.ALIGN_LEFT
 
PdfWriter writer
 
String text
 
Rectangle box
 
int rotation = 0
 
int visibility
 
String fieldName
 
int options
 
int maxCharacterLength
 

Properties

BaseFont RealFont [get]
 
float BorderWidth [get, set]
 
int BorderStyle [get, set]
 
Color BorderColor [get, set]
 
Color BackgroundColor [get, set]
 
Color TextColor [get, set]
 
BaseFont Font [get, set]
 
float FontSize [get, set]
 
int Alignment [get, set]
 
string Text [get, set]
 
Rectangle Box [get, set]
 
int Rotation [get, set]
 
int Visibility [get, set]
 
string FieldName [get, set]
 
int Options [get, set]
 
int MaxCharacterLength [get, set]
 
PdfWriter Writer [get, set]
 

Constructor & Destructor Documentation

◆ BaseField()

iTextSharp.text.pdf.BaseField.BaseField ( PdfWriter  writer,
Rectangle  box,
String  fieldName 
)

Creates a new TextField.

Parameters
writerthe document PdfWriter
boxthe field location and dimensions
fieldNamethe field name. If null only the widget keys will be included in the field allowing it to be used as a kid field.

Member Function Documentation

◆ BreakLines()

static ArrayList iTextSharp.text.pdf.BaseField.BreakLines ( ArrayList  breaks,
BaseFont  font,
float  fontSize,
float  width 
)
staticprotected

◆ GetBorderAppearance()

PdfAppearance iTextSharp.text.pdf.BaseField.GetBorderAppearance ( )
protected

◆ GetHardBreaks()

static ArrayList iTextSharp.text.pdf.BaseField.GetHardBreaks ( String  text)
staticprotected

◆ MoveFields()

static void iTextSharp.text.pdf.BaseField.MoveFields ( PdfDictionary  from,
PdfDictionary  to 
)
static

Moves the field keys from from to to. The moved keys are removed from from.

Parameters
fromthe source
tothe destination. It may be null

◆ SetRotationFromPage()

void iTextSharp.text.pdf.BaseField.SetRotationFromPage ( Rectangle  page)

Convenience method to set the field rotation the same as the page rotation.

Parameters
pagethe page

◆ TrimRight()

static void iTextSharp.text.pdf.BaseField.TrimRight ( StringBuilder  buf)
staticprotected

Member Data Documentation

◆ alignment

int iTextSharp.text.pdf.BaseField.alignment = Element.ALIGN_LEFT
protected

◆ backgroundColor

Color iTextSharp.text.pdf.BaseField.backgroundColor
protected

◆ BORDER_WIDTH_MEDIUM

const float iTextSharp.text.pdf.BaseField.BORDER_WIDTH_MEDIUM = 2
static

A medium border with 2 point width.

◆ BORDER_WIDTH_THICK

const float iTextSharp.text.pdf.BaseField.BORDER_WIDTH_THICK = 3
static

A thick border with 3 point width.

◆ BORDER_WIDTH_THIN

const float iTextSharp.text.pdf.BaseField.BORDER_WIDTH_THIN = 1
static

A thin border with 1 point width.

◆ borderColor

Color iTextSharp.text.pdf.BaseField.borderColor
protected

◆ borderStyle

int iTextSharp.text.pdf.BaseField.borderStyle = PdfBorderDictionary.STYLE_SOLID
protected

◆ borderWidth

float iTextSharp.text.pdf.BaseField.borderWidth = BORDER_WIDTH_THIN
protected

◆ box

Rectangle iTextSharp.text.pdf.BaseField.box
protected

◆ COMB

const int iTextSharp.text.pdf.BaseField.COMB = PdfFormField.FF_COMB
static

combo box flag.

◆ DO_NOT_SCROLL

const int iTextSharp.text.pdf.BaseField.DO_NOT_SCROLL = PdfFormField.FF_DONOTSCROLL
static

The field will not scroll (horizontally for single-line fields, vertically for multiple-line fields) to accommodate more text than will fit within its annotation rectangle. Once the field is full, no further text will be accepted.

◆ DO_NOT_SPELL_CHECK

const int iTextSharp.text.pdf.BaseField.DO_NOT_SPELL_CHECK = PdfFormField.FF_DONOTSPELLCHECK
static

The text entered in the field will not be spell-checked. This flag is meaningful only in text fields and in combo fields with the EDIT flag set.

◆ EDIT

const int iTextSharp.text.pdf.BaseField.EDIT = PdfFormField.FF_EDIT
static

If set the combo box includes an editable text box as well as a drop list; if clear, it includes only a drop list. This flag is only meaningful with combo fields.

◆ fieldName

String iTextSharp.text.pdf.BaseField.fieldName
protected

Holds value of property fieldName.

◆ FILE_SELECTION

const int iTextSharp.text.pdf.BaseField.FILE_SELECTION = PdfFormField.FF_FILESELECT
static

The text entered in the field represents the pathname of a file whose contents are to be submitted as the value of the field.

◆ font

BaseFont iTextSharp.text.pdf.BaseField.font
protected

◆ fontSize

float iTextSharp.text.pdf.BaseField.fontSize = 0
protected

◆ HIDDEN

const int iTextSharp.text.pdf.BaseField.HIDDEN = 1
static

The field is hidden.

◆ HIDDEN_BUT_PRINTABLE

const int iTextSharp.text.pdf.BaseField.HIDDEN_BUT_PRINTABLE = 3
static

The field is hidden but is printable.

◆ maxCharacterLength

int iTextSharp.text.pdf.BaseField.maxCharacterLength
protected

Holds value of property maxCharacterLength.

◆ MULTILINE

const int iTextSharp.text.pdf.BaseField.MULTILINE = PdfFormField.FF_MULTILINE
static

The field may contain multiple lines of text. This flag is only meaningful with text fields.

◆ options

int iTextSharp.text.pdf.BaseField.options
protected

Holds value of property options.

◆ PASSWORD

const int iTextSharp.text.pdf.BaseField.PASSWORD = PdfFormField.FF_PASSWORD
static

The field is intended for entering a secure password that should not be echoed visibly to the screen.

◆ READ_ONLY

const int iTextSharp.text.pdf.BaseField.READ_ONLY = PdfFormField.FF_READ_ONLY
static

The user may not change the value of the field.

◆ REQUIRED

const int iTextSharp.text.pdf.BaseField.REQUIRED = PdfFormField.FF_REQUIRED
static

The field must have a value at the time it is exported by a submit-form action.

◆ rotation

int iTextSharp.text.pdf.BaseField.rotation = 0
protected

Holds value of property rotation.

◆ text

String iTextSharp.text.pdf.BaseField.text
protected

◆ textColor

Color iTextSharp.text.pdf.BaseField.textColor
protected

◆ visibility

int iTextSharp.text.pdf.BaseField.visibility
protected

Holds value of property visibility.

◆ VISIBLE

const int iTextSharp.text.pdf.BaseField.VISIBLE = 0
static

The field is visible.

◆ VISIBLE_BUT_DOES_NOT_PRINT

const int iTextSharp.text.pdf.BaseField.VISIBLE_BUT_DOES_NOT_PRINT = 2
static

The field is visible but does not print.

◆ writer

PdfWriter iTextSharp.text.pdf.BaseField.writer
protected

Property Documentation

◆ Alignment

int iTextSharp.text.pdf.BaseField.Alignment
getset

Sets the text horizontal alignment. It can be Element.ALIGN_LEFT, Element.ALIGN_CENTER and Element.ALIGN_RIGHT.

Parameters
alignmentthe text horizontal alignment

◆ BackgroundColor

Color iTextSharp.text.pdf.BaseField.BackgroundColor
getset

Sets the background color. Set to null for transparent background.

Parameters
backgroundColorthe background color

◆ BorderColor

Color iTextSharp.text.pdf.BaseField.BorderColor
getset

Sets the border color. Set to null to remove the border.

Parameters
borderColorthe border color

◆ BorderStyle

int iTextSharp.text.pdf.BaseField.BorderStyle
getset

Sets the border style. The styles are found in PdfBorderDictionary and can be STYLE_SOLID, STYLE_DASHED, STYLE_BEVELED, STYLE_INSET and STYLE_UNDERLINE.

Parameters
borderStylethe border style

◆ BorderWidth

float iTextSharp.text.pdf.BaseField.BorderWidth
getset

Sets the border width in points. To eliminate the border set the border color to null.

Parameters
borderWidththe border width in points

◆ Box

Rectangle iTextSharp.text.pdf.BaseField.Box
getset

Sets the field dimension and position.

Parameters
boxthe field dimension and position

◆ FieldName

string iTextSharp.text.pdf.BaseField.FieldName
getset

Sets the field name.

Parameters
fieldNamethe field name. If null only the widget keys will be included in the field allowing it to be used as a kid field.

◆ Font

BaseFont iTextSharp.text.pdf.BaseField.Font
getset

Sets the text font. If null then Helvetica will be used.

Parameters
fontthe text font

◆ FontSize

float iTextSharp.text.pdf.BaseField.FontSize
getset

Sets the font size. If 0 then auto-sizing will be used but only for text fields.

Parameters
fontSizethe font size

◆ MaxCharacterLength

int iTextSharp.text.pdf.BaseField.MaxCharacterLength
getset

Sets the maximum length of the field’s text, in characters. It is only meaningful for text fields.

Parameters
maxCharacterLengththe maximum length of the field’s text, in characters

◆ Options

int iTextSharp.text.pdf.BaseField.Options
getset

Sets the option flags. The option flags can be a combination by oring of READ_ONLY, REQUIRED, MULTILINE, DO_NOT_SCROLL, PASSWORD, FILE_SELECTION, DO_NOT_SPELL_CHECK and EDIT.

Parameters
optionsthe option flags

◆ RealFont

BaseFont iTextSharp.text.pdf.BaseField.RealFont
getprotected

◆ Rotation

int iTextSharp.text.pdf.BaseField.Rotation
getset

Sets the field rotation. This value should be the same as the page rotation where the field will be shown.

Parameters
rotationthe field rotation

◆ Text

string iTextSharp.text.pdf.BaseField.Text
getset

Sets the text for text fields.

Parameters
textthe text

◆ TextColor

Color iTextSharp.text.pdf.BaseField.TextColor
getset

Sets the text color. If null the color used will be black.

Parameters
textColorthe text color

◆ Visibility

int iTextSharp.text.pdf.BaseField.Visibility
getset

Sets the field visibility flag. This flags can be one of VISIBLE, HIDDEN, VISIBLE_BUT_DOES_NOT_PRINT and HIDDEN_BUT_PRINTABLE.

Parameters
visibilityfield visibility flag

◆ Writer

PdfWriter iTextSharp.text.pdf.BaseField.Writer
getset

The documentation for this class was generated from the following file: