Skip to content

Commit 21a17e7

Browse files
author
Benoit Lagae
committed
Correct extraction of Unicode form field names
DEVSIX-1357
1 parent 1dfb78f commit 21a17e7

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

forms/src/main/java/com/itextpdf/forms/PdfAcroForm.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -845,10 +845,10 @@ private Map<String, PdfFormField> iterateFields(PdfArray array, Map<String, PdfF
845845
parentField = PdfFormField.makeFormField(parentField.getParent(), document);
846846
}
847847
}
848-
name = fieldName.toUnicodeString() + "." + index;
848+
name = fieldName.getValue() + "." + index;
849849
index++;
850850
} else {
851-
name = fieldName.toUnicodeString();
851+
name = fieldName.getValue();
852852
}
853853
fields.put(name, formField);
854854
if (formField.getKids() != null) {

forms/src/main/java/com/itextpdf/forms/fields/PdfFormField.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1214,12 +1214,12 @@ public PdfString getFieldName() {
12141214
PdfFormField parentField = PdfFormField.makeFormField(getParent(), getDocument());
12151215
PdfString pName = parentField.getFieldName();
12161216
if (pName != null) {
1217-
parentName = pName.toUnicodeString() + ".";
1217+
parentName = pName.getValue() + ".";
12181218
}
12191219
}
12201220
PdfString name = getPdfObject().getAsString(PdfName.T);
12211221
if (name != null) {
1222-
name = new PdfString(parentName + name.toUnicodeString());
1222+
name = new PdfString(parentName + name.getValue());
12231223
}
12241224
return name;
12251225
}

0 commit comments

Comments
 (0)