OpenOffice Input field references truncated to 20 characters

In the attached ODT document there are 3 Input fields, with References of length 20, 21, and 22 characters respectively. The latter 2 are truncated to 20 characters.

image.png (228.0 KB)

Code to reproduce the problem:

Document document = new Document("InputFieldTest3.odt");
FormFieldCollection fields = document.getRange().getFormFields();
for (FormField field : fields) {
    System.out.println("field name=" + field.getName() + ", length=" + field.getName().length());
}

Output of the above:

field name=20 character string., length=20
field name=This should be 21..., length=20
field name=This should be 22..., length=20

ODT file (in zip to get round forum restriction): InputFieldTest3.zip (6.5 KB)

@unb Aspose.Words is designed to work with MS Word documents at first. Microsoft Word allows form field names with at most 20 characters. So upon loading ODT document it truncates form field names to 20 characters.
This limitation is described in FormField.Name property remarks:
https://reference.aspose.com/words/java/com.aspose.words/formfield/#getName

OpenOffice documents have no such limitation. In OpenOffice the reference is used as a tooltip, so 20 characters is quite small.
Can’t the limit be determined by the document format being used?

Is the input field reference available by some other means?

@unb
We have opened the following new ticket(s) in our internal issue tracking system and will deliver their fixes according to the terms mentioned in Free Support Policies.

Issue ID(s): WORDSNET-25648

You can obtain Paid Support Services if you need support on a priority basis, along with the direct access to our Paid Support management team.

Is the input field reference available by some other means?

Form fields are available through Document.Range.FormField collection. Please see our documentation to lean more about working with form fields:
https://docs.aspose.com/words/java/working-with-form-fields/