pdfbox-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Wojack, Robert (USTP)" <Robert.Woj...@usdoj.gov>
Subject RE: How to set interactive form field to be decimal only?
Date Mon, 20 Jun 2016 12:45:12 GMT
Thanks!


-----Original Message-----
From: Gilad Denneboom [mailto:gilad.denneboom@gmail.com] 
Sent: Saturday, June 18, 2016 4:50 AM
To: users@pdfbox.apache.org
Subject: Re: How to set interactive form field to be decimal only?

OK, in that case you can apply these scripts to them:
As the Format script: AFNumber_Format(2, 0, 0, 0, "", false); As the KeyStroke script: AFNumber_Keystroke_Format(2,
0, 0, 0, "", false);

On Fri, Jun 17, 2016 at 8:05 PM, Wojack, Robert (USTP) < Robert.Wojack@usdoj.gov> wrote:

> Thanks, Gilad. The fields in question are USD currency fields -- no "$"
> symbols, just decimal numbers with a scale of two.
>
> -----Original Message-----
> From: Gilad Denneboom [mailto:gilad.denneboom@gmail.com]
> Sent: Friday, June 17, 2016 12:38 PM
> To: users@pdfbox.apache.org
> Subject: Re: How to set interactive form field to be decimal only?
>
> 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) < 
> Robert.Wojack@usdoj.gov> 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:     Robert.Wojack@usdoj.gov<mailto:
> > Robert.Wojack@usdoj.gov>
> > Onsite Phone Number:    TBD
> > Cell#:                              (301)910-9975
> >
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@pdfbox.apache.org
> For additional commands, e-mail: users-help@pdfbox.apache.org
>
>
Mime
View raw message