Issue with PDF Template Having Calculated Text Field set to "0"

I have a PDF template that is filled with data using the Form.ImportXfdf(…) method.
After filling the form using the above method, a calculated value text field that has value “0” prefilled, gets the “0” value removed. This happens without setting the value for the dependent text fields.

Please refer to the screenshots below.
Text Field Properties.png (6.5 KB)
BeforeAndAfter.png (10.7 KB)

QUESTION: Is there a way to preserve the prefilled values for calculated fields?


Can you please share source files along with generated result and sample code so that we may further investigate to help you out.

I’m attaching the source code (PrefillPdfHandler.cs), the DataToBefilled.xfdf which contains the data and the PDF form where the data is being filled. After the data was filled, the “0” digit from the “Grant Total” calculated field is being removed by the AsposePDF library. (94.5 KB)


I like to inform that we have tried to reproduce issue but we are unable to use the code snippet shared by you, in our environment as it includes few undefined or unknown variables. Kindly share a narrowed down sample project which reproduces the problem reported by you. So that we may reproduce and investigate it in our environment to help you out.

I’m attaching the requested project that reproduces the issue (404.5 KB)


I have observed your issue and like to inform that I have created investigation ticket with ID PDFNET-47609 in our issue tracking system to investigate and resolve this issue as soon possible.