Table of Contents

Class AlwaysThrowExceptionStrategy

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

A OnDuplicateFormFieldNameStrategy implementation that throws an exception if the second field has the same name as the first field.

public class AlwaysThrowExceptionStrategy : OnDuplicateFormFieldNameStrategy
Inheritance
AlwaysThrowExceptionStrategy
Implements
Inherited Members

Constructors

AlwaysThrowExceptionStrategy()

Creates an instance of AlwaysThrowExceptionStrategy

public AlwaysThrowExceptionStrategy()

Methods

Execute(PdfFormField, PdfFormField, bool)

executes the strategy.

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