AppendDocumentResult Class
Contains the result of a document append operation, including information about resolved form field name conflicts.
Declaration
public class AppendDocumentResult extends JavaObject
Remarks
When you merge PDF documents that contain AcroForm fields, the source and target documents may contain fields with identical names. The API resolves the conflict and returns an AppendDocumentResult object with information about affected fields.
Use the getResolvedFieldNameConflicts() method to access the list of conflicts resolved during the merge operation.
// Open a document to append.
try (PdfDocument source = new PdfDocument(
FileChannel.open(Path.of("Source.pdf")))) {
// Append the document to the current document.
AppendDocumentResult result = pdfDocument.appendDocument(source);
// Check for resolved form field name conflicts.
for (FormFieldNameConflict conflict : result.getResolvedFieldNameConflicts()) {
System.out.println("Target field: " + conflict.getTargetField());
System.out.println("Renamed source field: " + conflict.getRenamedField());
}
}
Refer to the following help topic for additional information: Merge PDF Documents.
Inherited Members
Inheritance
AppendDocumentResult(List<FormFieldNameConflict> resolvedFieldNameConflicts)
Initializes a new instance of the AppendDocumentResult class with the specified resolved form field name conflicts.
Declaration
public AppendDocumentResult(List<FormFieldNameConflict> resolvedFieldNameConflicts)
Parameters
| Name | Type | Description |
|---|---|---|
| resolvedFieldNameConflicts | java.util.List<FormFieldNameConflict> | A list of form field name conflicts resolved during the document append operation. |
Methods
getResolvedFieldNameConflicts() Method
Returns a list of form field name conflicts resolved during the document append operation.
Declaration
public List<FormFieldNameConflict> getResolvedFieldNameConflicts()
Returns
| Type | Description |
|---|---|
| java.util.List<FormFieldNameConflict> | A list of form field name conflicts resolved during the document append operation. |