Upgraded Version 23.5 + some of the Textbox field's is not set the value

Hi Asad.ali,
We have upgraded the version 23.5 now. we are going to push to Prod. In our PDF template, in header, footer , we have keep the “Note No:” in every page. Its working fine when we are using 10.5. But while use 23.5 version, in some of the places , Note No value is not rendering. (Note : Due to Organization policy, I couldnt share the PDF template.

Code:
Facades.Form frm1 = new Facdes.Form(doc);

for(Field objF in doc.Form)
{
FieldTYpe fieldobj = form.GetFieldType(objF.FullName);
switch(fieldObj)
{
case FieldType.Text - We will set the value for Textbox
TextBoxField objtxt = doc.Form[objF.FullName] as TextBoxField;
objtxt.Value = “123-456-7890”;
break;
case FieldType.Radio - We will set the value for Textbox
case FieldType.CheckBox - We will set the value for Textbox
default:
frm1.FillField(NameofField, value);
break;
}
}

@Amarsha

The latest version is 24.4, not 23.5. Furthermore, we are afraid that we are unable to understand the issue clearly. We do need a sample document for testing and replicating the issue in our environment in order to address it accordingly. We assure you that we only use the documents for testing and investigation purposes and erase them from our system once issue is resolved. Furthermore, you have already initiated the discussion in a private message where only Aspose Staff can download and view the files.

@Asad.ali: After the case statement, we have old code like doc.Flatten() - we found the issue here and replaced with
doc.Form.Flatten() - its working fine.
Thanks.

@Amarsha

It is nice to know that your issue has been sorted out. We are moving this thread to public forum so that anyone facing the same issue could take some help from this discussion. In case you need further assistance, please feel free to create a new topic.

@Asad.ali: Yeah sure. I’m facing another issue. Same code changes, we are using in Java API side. Here, even we are using the doc.getform().flatten() to resolve the above issue. In .Net - its working fine. but, in Java side, its not working. Please place the 10 or 15 textboxe’s with same name (if you have acrobat writer) in the PDF in different page and test.

Java API: 23.1
.Net API: 23.5

Can you give solution for this ?
Thanks

@Amarsha

We already mentioned that the latest version of .NET API is 24.4 not 23.5 :slight_smile: Anyways, please note that all changes and improvements are ported from .NET into equivalent version of Java API. At the moment, latest version of Java API is 24.3. You can try using it to see if it resolves your issue. In case it does not, we believe it would be resolved with 24.4 version which will be releasing soon in coming week.

In the meanwhile, we would really appreciate if you could please provide a sample file from your side. You could please create it for testing and if issue keeps happening, you can share that with us so that we can further proceed accordingly.