Table of Contents

Class AddIndexStrategy

Namespace
iText.Forms.Fields.Merging
Assembly
itext.forms.dll

A OnDuplicateFormFieldNameStrategy implementation that adds an index to the field name of the second field

public class AddIndexStrategy : OnDuplicateFormFieldNameStrategy
Inheritance
AddIndexStrategy
Implements
Inherited Members

Constructors

AddIndexStrategy()

public AddIndexStrategy()

AddIndexStrategy(string)

Creates a new AddIndexStrategy instance.

public AddIndexStrategy(string separator)

Parameters

separator string

the separator that will be used to separate the original field name and the index

Methods

Execute(PdfFormField, PdfFormField, bool)

Renames the second field by adding an index to its name.

public virtual bool Execute(PdfFormField firstField, PdfFormField secondField, bool throwExceptionOnError)

Parameters

firstField PdfFormField

the first field

secondField PdfFormField

the second field

throwExceptionOnError bool

if true, an exception will be thrown

Returns

bool

true if the second field was renamed successfully, false otherwise