This is usually achieved using some undocumented JS methods, namely
AFNumber_Format and AFNumber_Keystroke.
Their usage is a bit strange, so if you say how you want the field to
function I could provide you with the exact code to use in your case.

On Fri, Jun 17, 2016 at 5:56 PM, Wojack, Robert (USTP) <
[email protected]> wrote:

> We have a client that provides us with interactive PDF forms for our app
> to populate fields with user data. The problem is the client sometimes
> provides us forms with typos and mistakes and is not responsive about
> fixing them.
>
> In this case, we are given an interactive PDF form that has many currency
> fields. Some fields have their format property set such that they only
> accept decimal values, and other have no formatting.
>
> I have found methods that seem to retrieve the formatting or describe the
> number formatting (such as PDNumberFormatDictionary), but nothing that
> seems to say, "make this a decimal only field".
> Given that I know which fields require this formatting, is it possible to
> set this via PDFBox? If so, can someone please provide some guidance?
> We are using PDFBox 1.8.11. We are not positioned to upgrade to 2.0.0.
>
> Thanks
>
>
> Bob Wojack
> CSRA International, Inc.
> Onsite Contractor for the Department of Justice
> Senior Tech Lead
> US Trustee Program
> Onsite Email Address:     [email protected]<mailto:
> [email protected]>
> Onsite Phone Number:    TBD
> Cell#:                              (301)910-9975
>
>

Reply via email to