public final class PdfFormFieldMergeUtil extends Object
PdfFormField with the same names.| Modifier and Type | Method and Description |
|---|---|
static String |
getPartialName(AbstractPdfFormField field)
Gets partial name for the field dictionary.
|
static void |
mergeKidsWithSameNames(PdfFormField parentField,
boolean throwExceptionOnError)
This method merges all kids with the same names for the given parent field dictionary (recursively).
|
static boolean |
mergeTwoFieldsWithTheSameNames(PdfFormField firstField,
PdfFormField secondField,
boolean throwExceptionOnError)
This method merges different values from two field dictionaries into the first one and combines kids.
|
static void |
processDirtyAnnotations(PdfFormField parentField,
boolean throwExceptionOnError)
Sometimes widgets contain field related keys, and they are the same as these field keys at parent.
|
public static void mergeKidsWithSameNames(PdfFormField parentField, boolean throwExceptionOnError)
parentField - a field whose kids should be checked and merged in case of same partial names.throwExceptionOnError - true if the exception is expected after the merge failed, false if log is expected.public static boolean mergeTwoFieldsWithTheSameNames(PdfFormField firstField, PdfFormField secondField, boolean throwExceptionOnError)
firstField - a field into which dictionary all values will be merged.secondField - a field whose values should be merged into the first dictionary.throwExceptionOnError - true if the exception is expected after the merge failed, false if log is expected.public static String getPartialName(AbstractPdfFormField field)
field - field to get name from.public static void processDirtyAnnotations(PdfFormField parentField, boolean throwExceptionOnError)
(/DA <DA1> /Ft <Tx> /T <test> /Kids <Field>) ->
Field (/DA <DA1> /Kids <Annotation>) -> Annotation (without any form fields)
This method combines ParentField with Field.
parentField - a field whose form field kids should be checked and merged with parent in case
all their dictionary values (except Parent and Kids) are the same
or parent is a radio button.throwExceptionOnError - true if the exception is expected after the merge failed, false if log is expected.Copyright © 1998–2023 Apryse Group NV. All rights reserved.