FieldNameConflictResolution Enum
Lists form field name conflict resolution modes that apply when the API saves a PDF document.
Declaration
public enum FieldNameConflictResolution extends Enum<FieldNameConflictResolution> implements IIntEnum
Members
| Name | Description |
|---|---|
RENAME_ALL_CONFLICTS
|
The API renames form fields to resolve all name conflicts, including conflicts that the loaded document contains. |
RENAME_NEW_CONFLICTS
|
The API renames form fields to resolve new name conflicts. Conflicts that the loaded document contains remain. |
THROW_ON_ALL_CONFLICTS
|
The API throws an exception if the document contains form field name conflicts, including conflicts that the loaded document contains. |
THROW_ON_NEW_CONFLICTS
|
The API throws an exception if the document contains new form field name conflicts. Conflicts that the loaded document contains do not cause an exception. |
fromValue(int value)
|
Returns the |
getName()
|
Returns the name of the |
getValue()
|
Returns the integer value of the |
toString()
|
Returns the string representation of the |
valueOf(String name)
|
Returns the |
values()
|
Returns an array of all |
Remarks
Call the SaveOptions.getFieldNameConflictResolution() method to get the form field name conflict resolution mode. Call the SaveOptions.setFieldNameConflictResolution(value) method to specify the mode.
A name conflict exists if multiple form fields in a document have the same full name. A new conflict is a conflict that the document did not contain when you loaded it (for example, after you add a form field with an existing name or rename a form field).
If the API renames form fields, it keeps the name of the first field in the conflict and assigns names such as Field0 and Field1 to other fields. The SaveResult.getResolvedFieldNameConflicts() method returns renamed fields.
In THROW_ON_NEW_CONFLICTS and THROW_ON_ALL_CONFLICTS modes, if the document contains conflicts that the mode does not allow, PdfDocument.save methods do not save the document and throw an InvalidOperationException. The exception message lists conflicting field names.
Refer to the following help topic for additional information: Save PDF Documents.