They are two distinct checkboxes within a radio collection. The problem is they
both have their onValue set to "On". I need to set the onValue for one of them
to something else ("Off").
Your code has given me some ideas, but so far, I haven't been able to
adequately solve it.
Thanks,
Bob
-----Original Message-----
From: Maruan Sahyoun [mailto:[email protected]]
Sent: Thursday, March 24, 2016 6:16 AM
To: [email protected]
Subject: Re: How to bind distinct OnValues for checkbox group?
Hi,
are you sure that these are two distinct fields? If yes, you can set the On
value - using 1.8.x - with
PDAnnotationWidget widget = field.getWidget() PDAppearanceDictionary
apDictionary = widget.getAppearance(); PDAppearanceEntry normalAppearance =
apDictionary.getNormalAppearance();
// to get the current values
Map<String,PDAppearanceStream> appearanceMap =
apDictionary.getNormalAppearance();
// to set the values
apDictionary.setNormalAppearance(Map<String,PDAppearanceStream>);
Haven't tested that code but should give you an idea.
BR
Maruan
> Am 23.03.2016 um 16:51 schrieb Wojack, Robert (USTP)
> <[email protected]>:
>
> 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 a pair of Yes/No
> checkboxes. Unfortunately, when creating the PDF, the client bound both
> checkboxes to the same "On" value. As a result, when a user checks a box,
> both of them get checked (additionally, when a user unchecks a box, they both
> become unchecked).
>
> I can use PDFBox to open the file, find the PDCheckbox object in question and
> list their On and Off values, but I can't figure out how to update the
> bindings to distinct values. Is it possible to do this in PDFBox? If so, can
> someone please provide some guidance?
>
> We are using PDFBox 1.8.8. 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
>
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]