In a document with about 400 text fields a small number randomly don't save assigned values


I am looking for a bit of support populating AcroForms with Aspose.PDF. Attached are the original form and the output after iterating all fields and attempting to set a value using the code below.

The first 8 fields in the document accept a MaxLen of 1 and are populated with numbers however the values are not saved (except for field 5). the next 2 date combos are all MaxLen 1 Textboxes but only the first and and thirteenth are set).

Inspecting the field in a breakpoint does not reveal anything unusual.

Original : SH01_V7.0.pdf (673.8 KB)
Result : filltest4.pdf (952.4 KB)
Code :

        public string Welcome()
            string r = "";

            // Load PDF
            Document doc = new Document("C:\\path\\SH01_V7.0.pdf");

            int i = 0;
            foreach (Field formField in doc.Form)
                TextBoxField field = doc.Form[formField.PartialName] as TextBoxField;

                string v = i.ToString();
                if (field.MaxLen > 0)
                    v = v.Substring(0, field.MaxLen);
                formField.Value = v;

                r += $"Field {i} Name : {field.PartialName}\n";
                r += $"Value : {field.Value}\n";


            return $"Welcome!\n{r}";


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): PDFNET-56946

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.


I appreciate creating the ticket, I was really wondering if anyone could recreate my issue?

The documentation is not verbose and there’s a number of settings in an AcroForm Text field including event handlers and javascript. It’s not out of the question that there’s something wrong with my pdf document or if I’m just not seeing a setting or some sort of validation or something?

I appreciate the link to paid support, we are existing licence holders for Aspose.Word so we are evaluating Aspose.Pdf and others (which did populate all fields btw, I won’t name names!) to handle our requirement for parsing AcroForms. Once we get the POC out the way we may well upgrade our sub however this is our first concept test.


Such type of documents that you shared may surely have internal JavaScript defined that executes when you interact with the document physically in Adobe Reader or similar software. We are afraid that executing JS while filling form field is still something that we are working on to implement in our API. Therefore, this ticket was created for the analysis of your document.

Secondly, the paid support link is post as per the policy and the reply was system generated when we attached the ticket to this forum thread. Nevertheless, we will surely inform you here as soon as some progress is made towards ticket resolution. Please be patient and spare us some time.

We are sorry for the inconvenience.

No problem, thanks for taking the time to look and for coming back to me!

I appricaite your comment regarding Javascript however I have opened the document in Adobe Acrobat and checked its fields, there is no formatting, validation or any option set other than the 1 character limit.

The first 8 fields in the form are identical in every way but only the 5th one works!

Hope this helps.


Thanks for sharing further information and your findings. Yes, we have already recreated the issue of fields not getting filled. Every information shared and discussed here has been logged with the ticket. We will let you know as soon as the ticket is resolved.