Format TextBoxField to Number

0 Answers 118 Views
PdfProcessing
Lee
Top achievements
Rank 1
Iron
Lee asked on 08 Dec 2021, 12:56 PM | edited on 09 Dec 2021, 07:09 AM

I have a PDF with a number of text fields that have a number format. I am updating them with calculated values: 

     If PDFdocument.AcroForm.FormFields.Contains(row.Item("XMLField").ToString()) Then
         field = PDFdocument.AcroForm.FormFields.Item(row.Item("XMLField").ToString())

         Select Case field.FieldType
               Case FormFieldType.TextBox
                         ModifyTextBox(CType(field, TextBoxField), OutText)
               Case FormFieldType.CheckBox
                         Try
                              ModifyCheckBox(CType(field, CheckBoxField), New String() {row.Item("OutText").ToString()})
                         Catch
                         End Try
         End Select
     End If

When this executes the number format is over written and I see 1222777.00 instead of 1,222,777.00.

Is there a way to either not lose the number format or reset the number format for the PDF Text field.? 

To clarify before the ModifyTextBox command the TextField is formatted as follows:

 After the ModifyTextBox command the format tab is changed to None:

 

Dimitar
Telerik team
commented on 10 Dec 2021, 10:03 AM

Hi Lee,

This looks like an issue. However, I cannot be sure without examining the file. Would it be possible to open a new support ticket (which is a private thread) and attach this file there? This will allow us to properly investigate the case and determine what is causing this. 

Thank you in advance for your patience and cooperation.

Lee
Top achievements
Rank 1
Iron
commented on 15 Dec 2021, 03:36 PM

Support ticket created: 1546616

Dimitar
Telerik team
commented on 16 Dec 2021, 07:07 AM

Hi Lee, 

Thank you for creating a ticket, I will check it as soon as possible.

No answers yet. Maybe you can help?

Tags
PdfProcessing
Asked by
Lee
Top achievements
Rank 1
Iron
Share this question
or