Getting Comb from TextBoxField

Hi Support,

I am currently facing an issue with a PDF document containing a comb TextBoxField. There is a space between characters that I am unable to retrieve through the properties of the TextBoxField.

I noticed that it can be set using the formeditor.SetFieldCombNumber method, but I am having difficulty retrieving it.

Could you please provide information on how Aspose handles the Comb textboxfield feature? I observed that it is displayed as a TextBoxField with widget annotations within the items of the textbox. I am seeking clarification on how to retrieve all information about this comb TextBoxField.

Thank you for your assistance.

@Tenjim
I looked how method SetFieldCombNumber works - there is findibg a field by name, certain checks are carried out for it and then it is executed (which seems to be different from what is indicated in the description)

field.MaxLen = combNumber;
field.ForceCombs = true;

Please attach a document with the mentioned field and on it explain in more detail what you would like to do?

Hi @sergei.shibanov ,

Yeah I understood what you describe. In attachment, I added the document pdf I want to know how Aspose retrieve the first textbox. I saw that textboxfield named “PAF_VSNR_trim” is a comb of character and replicated on all pages.
I don’t see anything into docs about the behavior of replicated pages into widget annotation.

My goals is to retrieve all this informations and doing an textboxfield on my own wpf application
G0100_Antrag - WithAListBox.pdf (808.7 KB)

@Tenjim
You want to extract what is entered into the fields located on each page in the upper left corner (see screenshot).
Did I understand your request correctly?
123.png (91.8 KB)

Yes correctly, at this moment I just see in this textbox field. Many widget annotations with different pagenumber. Is the correct behavior of Aspose ?

@Tenjim
This week I completed the work. I will return to your question on Monday and write to you.

@Tenjim
You can use the following code.

var doc = new Document(dataDir + "Annot.pdf");
var fields = doc.Form.Fields.Where(field => field.PartialName == "PAF_VSNR_trim").ToArray();
string res = fields[0].Value;
Console.WriteLine(res);

Annot.pdf (806.3 KB)

Thanks for the input. Btw, an replicated textboxfield with several widget annotation as items is the right behavior from aspose ? Because I just want to understand if it’s from pdf or aspose. I don’t see anything talk about it in documentation / API

@Tenjim
In this document, there is a main field that contains a value, and it is the parent of the fields located on the pages (which essentially display the value and accept input). This main field is not associated with any page, and its children are associated with it through the Parent entry. Those. what you call replication. I did not see any violations of the PDF specification with this approach, but the option is non-standard/unusual and it cannot be ruled out that in some of the scenarios something will work wrong.