Table of Contents

Class PdfAcroForm

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

Each PDF document can contain maximum 1 AcroForm.

public class PdfAcroForm : PdfDictionary
Inheritance
PdfAcroForm
Inherited Members

Constructors

PdfAcroForm(PdfWriter)

Creates new PdfAcroForm

public PdfAcroForm(PdfWriter writer)

Parameters

writer PdfWriter

Properties

NeedAppearances

public bool NeedAppearances { set; }

Property Value

bool

SigFlags

Adds fieldTemplates.

public int SigFlags { set; }

Property Value

int

Methods

AddCalculationOrder(PdfFormField)

public void AddCalculationOrder(PdfFormField formField)

Parameters

formField PdfFormField

AddCheckBox(string, string, bool, float, float, float, float)

public PdfFormField AddCheckBox(string name, string value, bool status, float llx, float lly, float urx, float ury)

Parameters

name string
value string
status bool
llx float
lly float
urx float
ury float

Returns

PdfFormField

AddComboBox(string, string[,], string, bool, BaseFont, float, float, float, float, float)

public PdfFormField AddComboBox(string name, string[,] options, string defaultValue, bool editable, BaseFont font, float fontSize, float llx, float lly, float urx, float ury)

Parameters

name string
options string[,]
defaultValue string
editable bool
font BaseFont
fontSize float
llx float
lly float
urx float
ury float

Returns

PdfFormField

AddComboBox(string, string[], string, bool, BaseFont, float, float, float, float, float)

public PdfFormField AddComboBox(string name, string[] options, string defaultValue, bool editable, BaseFont font, float fontSize, float llx, float lly, float urx, float ury)

Parameters

name string
options string[]
defaultValue string
editable bool
font BaseFont
fontSize float
llx float
lly float
urx float
ury float

Returns

PdfFormField

AddDocumentField(PdfIndirectReference)

public void AddDocumentField(PdfIndirectReference piref)

Parameters

piref PdfIndirectReference

AddFieldTemplates(INullValueDictionary<PdfTemplate, object>)

public void AddFieldTemplates(INullValueDictionary<PdfTemplate, object> ft)

Parameters

ft INullValueDictionary<PdfTemplate, object>

AddFormField(PdfFormField)

Adds documentFields.

public void AddFormField(PdfFormField formField)

Parameters

formField PdfFormField

AddHiddenField(string, string)

public PdfFormField AddHiddenField(string name, string value)

Parameters

name string
value string

Returns

PdfFormField

AddHtmlPostButton(string, string, string, string, BaseFont, float, float, float, float, float)

Adds an object to the calculationOrder.

public PdfFormField AddHtmlPostButton(string name, string caption, string value, string url, BaseFont font, float fontSize, float llx, float lly, float urx, float ury)

Parameters

name string
caption string
value string
url string
font BaseFont
fontSize float
llx float
lly float
urx float
ury float

Returns

PdfFormField

AddMap(string, string, string, PdfContentByte, float, float, float, float)

public PdfFormField AddMap(string name, string value, string url, PdfContentByte appearance, float llx, float lly, float urx, float ury)

Parameters

name string
value string
url string
appearance PdfContentByte
llx float
lly float
urx float
ury float

Returns

PdfFormField

AddMultiLineTextField(string, string, BaseFont, float, float, float, float, float)

public PdfFormField AddMultiLineTextField(string name, string text, BaseFont font, float fontSize, float llx, float lly, float urx, float ury)

Parameters

name string
text string
font BaseFont
fontSize float
llx float
lly float
urx float
ury float

Returns

PdfFormField

AddRadioButton(PdfFormField, string, float, float, float, float)

public PdfFormField AddRadioButton(PdfFormField radiogroup, string value, float llx, float lly, float urx, float ury)

Parameters

radiogroup PdfFormField
value string
llx float
lly float
urx float
ury float

Returns

PdfFormField

AddRadioGroup(PdfFormField)

public void AddRadioGroup(PdfFormField radiogroup)

Parameters

radiogroup PdfFormField

AddResetButton(string, string, string, BaseFont, float, float, float, float, float)

public PdfFormField AddResetButton(string name, string caption, string value, BaseFont font, float fontSize, float llx, float lly, float urx, float ury)

Parameters

name string
caption string
value string
font BaseFont
fontSize float
llx float
lly float
urx float
ury float

Returns

PdfFormField

AddSelectList(string, string[,], string, BaseFont, float, float, float, float, float)

public PdfFormField AddSelectList(string name, string[,] options, string defaultValue, BaseFont font, float fontSize, float llx, float lly, float urx, float ury)

Parameters

name string
options string[,]
defaultValue string
font BaseFont
fontSize float
llx float
lly float
urx float
ury float

Returns

PdfFormField

AddSelectList(string, string[], string, BaseFont, float, float, float, float, float)

public PdfFormField AddSelectList(string name, string[] options, string defaultValue, BaseFont font, float fontSize, float llx, float lly, float urx, float ury)

Parameters

name string
options string[]
defaultValue string
font BaseFont
fontSize float
llx float
lly float
urx float
ury float

Returns

PdfFormField

AddSignature(string, float, float, float, float)

public PdfFormField AddSignature(string name, float llx, float lly, float urx, float ury)

Parameters

name string
llx float
lly float
urx float
ury float

Returns

PdfFormField

AddSingleLinePasswordField(string, string, BaseFont, float, float, float, float, float)

public PdfFormField AddSingleLinePasswordField(string name, string text, BaseFont font, float fontSize, float llx, float lly, float urx, float ury)

Parameters

name string
text string
font BaseFont
fontSize float
llx float
lly float
urx float
ury float

Returns

PdfFormField

AddSingleLineTextField(string, string, BaseFont, float, float, float, float, float)

public PdfFormField AddSingleLineTextField(string name, string text, BaseFont font, float fontSize, float llx, float lly, float urx, float ury)

Parameters

name string
text string
font BaseFont
fontSize float
llx float
lly float
urx float
ury float

Returns

PdfFormField

DrawButton(PdfFormField, string, BaseFont, float, float, float, float, float)

public void DrawButton(PdfFormField button, string caption, BaseFont font, float fontSize, float llx, float lly, float urx, float ury)

Parameters

button PdfFormField
caption string
font BaseFont
fontSize float
llx float
lly float
urx float
ury float

DrawCheckBoxAppearences(PdfFormField, string, float, float, float, float)

public void DrawCheckBoxAppearences(PdfFormField field, string value, float llx, float lly, float urx, float ury)

Parameters

field PdfFormField
value string
llx float
lly float
urx float
ury float

DrawMultiLineOfText(PdfFormField, string, BaseFont, float, float, float, float, float)

public void DrawMultiLineOfText(PdfFormField field, string text, BaseFont font, float fontSize, float llx, float lly, float urx, float ury)

Parameters

field PdfFormField
text string
font BaseFont
fontSize float
llx float
lly float
urx float
ury float

DrawRadioAppearences(PdfFormField, string, float, float, float, float)

public void DrawRadioAppearences(PdfFormField field, string value, float llx, float lly, float urx, float ury)

Parameters

field PdfFormField
value string
llx float
lly float
urx float
ury float

DrawSignatureAppearences(PdfFormField, float, float, float, float)

public void DrawSignatureAppearences(PdfFormField field, float llx, float lly, float urx, float ury)

Parameters

field PdfFormField
llx float
lly float
urx float
ury float

DrawSingleLineOfText(PdfFormField, string, BaseFont, float, float, float, float, float)

public void DrawSingleLineOfText(PdfFormField field, string text, BaseFont font, float fontSize, float llx, float lly, float urx, float ury)

Parameters

field PdfFormField
text string
font BaseFont
fontSize float
llx float
lly float
urx float
ury float

GetRadioGroup(string, string, bool)

public PdfFormField GetRadioGroup(string name, string defaultValue, bool noToggleToOff)

Parameters

name string
defaultValue string
noToggleToOff bool

Returns

PdfFormField

IsValid()

public bool IsValid()

Returns

bool

SetButtonParams(PdfFormField, int, string, string)

public static void SetButtonParams(PdfFormField button, int characteristics, string name, string value)

Parameters

button PdfFormField
characteristics int
name string
value string

SetCheckBoxParams(PdfFormField, string, string, bool, float, float, float, float)

public static void SetCheckBoxParams(PdfFormField field, string name, string value, bool status, float llx, float lly, float urx, float ury)

Parameters

field PdfFormField
name string
value string
status bool
llx float
lly float
urx float
ury float

SetChoiceParams(PdfFormField, string, string, float, float, float, float)

public static void SetChoiceParams(PdfFormField field, string name, string defaultValue, float llx, float lly, float urx, float ury)

Parameters

field PdfFormField
name string
defaultValue string
llx float
lly float
urx float
ury float

SetSignatureParams(PdfFormField, string, float, float, float, float)

public static void SetSignatureParams(PdfFormField field, string name, float llx, float lly, float urx, float ury)

Parameters

field PdfFormField
name string
llx float
lly float
urx float
ury float

SetTextFieldParams(PdfFormField, string, string, float, float, float, float)

public static void SetTextFieldParams(PdfFormField field, string text, string name, float llx, float lly, float urx, float ury)

Parameters

field PdfFormField
text string
name string
llx float
lly float
urx float
ury float