iText 9.5.0 API
iText.Forms.Fields.Merging.OnDuplicateFormFieldNameStrategy Interface Reference

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

Inheritance diagram for iText.Forms.Fields.Merging.OnDuplicateFormFieldNameStrategy:
iText.Forms.Fields.Merging.AddIndexStrategy iText.Forms.Fields.Merging.AlwaysThrowExceptionStrategy iText.Forms.Fields.Merging.MergeFieldsStrategy

Public Member Functions

bool  Execute (PdfFormField firstField, PdfFormField secondField, bool throwExceptionOnError)
  executes the strategy. More...
 

Detailed Description

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

Member Function Documentation

◆ Execute()

bool iText.Forms.Fields.Merging.OnDuplicateFormFieldNameStrategy.Execute ( PdfFormField  firstField,
PdfFormField  secondField,
bool  throwExceptionOnError 
)

executes the strategy.

Parameters
firstField the first field
secondField the second field
throwExceptionOnError if true, an exception will be thrown
Returns
true if the second field was merged successfully, false otherwise

Implemented in iText.Forms.Fields.Merging.AddIndexStrategy, iText.Forms.Fields.Merging.MergeFieldsStrategy, and iText.Forms.Fields.Merging.AlwaysThrowExceptionStrategy.