Actual query is on stackoverflow.com. Link: http://stackoverflow.com/questions/17557444/how-to-maintain-or-force-currency-formatting-in-pdf-with-aspose
Environment: Aspose.Pdf for .NET 8.2.0 and .NET framework 4.5.
See this PDF form and open in Adobe Reader. Enter any numeric value in currency textbox e.g. 123456. It is formatted like $1,234.56. Actual value is numeric, formatting is only for the display.
When I fill this form using Aspose.Pdf, the formatting is lost. See this form, which is created by Aspose.Pdf.
Sample code:
//open document
Aspose.Pdf.Document pdfDocument = new Aspose.Pdf.Document(dataDir + “form.pdf”);
//get a field
TextBoxField textBoxField = pdfDocument.Form[“Text2”] as TextBoxField;
//modify field value
textBoxField.Value = “123456789”;
//save updated document
pdfDocument.Save(dataDir + “form_filled.pdf”);