Table of Contents

Class AcroFields.Item

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

The field representations for retrieval and modification.

public class AcroFields.Item
Inheritance
AcroFields.Item
Inherited Members

Constructors

Item()

public Item()

Fields

Merged

An array of PdfDictionary with all the field and widget tags merged. @deprecated (will remove 'public' in the future)

public List<PdfDictionary> Merged

Field Value

List<PdfDictionary>

Page

An array of Integer with the page numbers where the widgets are displayed. @deprecated (will remove 'public' in the future)

public List<int> Page

Field Value

List<int>

TabOrder

An array of Integer with the tab order of the field in the page. @deprecated (will remove 'public' in the future)

public List<int> TabOrder

Field Value

List<int>

Values

An array of PdfDictionary where the value tag /V is present. @deprecated (will remove 'public' in the future)

public List<PdfDictionary> Values

Field Value

List<PdfDictionary>

WRITE_MERGED

writeToAll constant. @since 2.1.5

public const int WRITE_MERGED = 1

Field Value

int

WRITE_VALUE

writeToAll and markUsed constant. @since 2.1.5

public const int WRITE_VALUE = 4

Field Value

int

WRITE_WIDGET

writeToAll and markUsed constant. @since 2.1.5

public const int WRITE_WIDGET = 2

Field Value

int

WidgetRefs

An array of PdfDictionary with the widget references. @deprecated (will remove 'public' in the future)

public List<PdfIndirectReference> WidgetRefs

Field Value

List<PdfIndirectReference>

Widgets

An array of PdfDictionary with the widgets. @deprecated (will remove 'public' in the future)

public List<PdfDictionary> Widgets

Field Value

List<PdfDictionary>

Properties

Size

Preferred method of determining the number of instances of a given field. @since 2.1.5

public int Size { get; }

Property Value

int

number of instances

Methods

GetMerged(int)

Retrieve the merged dictionary for the given instance. The merged dictionary contains all the keys present in parent fields, though they may have been overwritten (or modified?) by children. Example: a merged radio field dict will contain /V @since 2.1.5

public PdfDictionary GetMerged(int idx)

Parameters

idx int

instance index

Returns

PdfDictionary

the merged dictionary for the given instance

GetPage(int)

Retrieve the page number of the given instance @since 2.1.5

public int GetPage(int idx)

Parameters

idx int

Returns

int

remember, pages are "1-indexed", not "0-indexed" like field instances.

GetTabOrder(int)

Gets the tabOrder. @since 2.1.5

public int GetTabOrder(int idx)

Parameters

idx int

Returns

int

tab index of the given field instance

GetValue(int)

Retrieve the value dictionary of the given instance @since 2.1.5

public PdfDictionary GetValue(int idx)

Parameters

idx int

instance index

Returns

PdfDictionary

dictionary storing this instance's value. It may be shared across instances.

GetWidget(int)

Retrieve the widget dictionary of the given instance @since 2.1.5

public PdfDictionary GetWidget(int idx)

Parameters

idx int

instance index

Returns

PdfDictionary

The dictionary found in the appropriate page's Annot array.

GetWidgetRef(int)

Retrieve the reference to the given instance @since 2.1.5

public PdfIndirectReference GetWidgetRef(int idx)

Parameters

idx int

instance index

Returns

PdfIndirectReference

reference to the given field instance

MarkUsed(AcroFields, int)

Mark all the item dictionaries used matching the given flags @since 2.1.5

public void MarkUsed(AcroFields parentFields, int writeFlags)

Parameters

parentFields AcroFields
writeFlags int

WRITE_MERGED is ignored

WriteToAll(PdfName, PdfObject, int)

This function writes the given key/value pair to all the instances of merged, widget, and/or value, depending on the writeFlags setting @since 2.1.5

public void WriteToAll(PdfName key, PdfObject value, int writeFlags)

Parameters

key PdfName

you'll never guess what this is for.

value PdfObject

if value is null, the key will be removed

writeFlags int

ORed together WRITE_* flags