pdfbox-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Maruan Sahyoun <sahy...@fileaffairs.de>
Subject Re: Going from 1.8.9 to 2.0
Date Thu, 25 Jun 2015 18:26:27 GMT

> Am 25.06.2015 um 20:16 schrieb John Hewson <john@jahewson.com>:
> 
> 
>> On 24 Jun 2015, at 13:20, Evan Williams <evan.williams@zapprx.com> wrote:
>> 
>> I have an application written to use pdfbox 1.8.9 which is all about
>> filling forms. I have a form library and I fill in values in forms using
>> data I am handed.
>> 
>> One of the things I also need to do is do introspection on the pdf document
>> to find out what fields are in it and make a template for filling the form
>> with data in my application.
>> 
>> I am trying to get my application to work with pdfbox 2.0. Getting the
>> forms I have to fill was pretty straightforward.
>> 
>> But I am having some difficulty with the introspection.
>> 
>> For the templates I like to have an enumeration of the possible values of
>> the field if the field has such values. For example the names of the
>> possible values for a collection of radio buttons.
>> 
>> I understood how to get those values for the 1.8.9 PDRadioCollection but I
>> have tried various things to get the same information for the 2.0
>> PDRadioButton and I am not getting the information I need. the getOptions()
>> method on PDButton looked like exactly what I needed. But it always returns
>> null for me.
>> 
>> As an aside I also used to get the on and off values of checkboxes with
>> getOnValue() and getOffValue(). These are in the Javadoc but appear to not
>> be in the actual API. I don't care very much about those, but they were
>> nice to have, and the Javadoc should be accurate as much as possible.
> 
> The getOnValue() and getOffValue() APIs were removed because there’s no
> need for them. The on value of a checkbox is always “Yes” and the off value
> is always “Off”. These correspond to COSName.YES and COSName.OFF.

Yes, but 1.8.x treated individual radio buttons within a radio button group as checkboxes
and so getOnValue() returned the option for the selected state of the individual radio button.


> 
> I don’t know why these methods still show in the JavaDoc, as they were
> removed some time ago… the JavaDoc must be stale.

It is as there is no automatic update

> 
> — John
> 
>> If anyone can help me with the RadioButton thing that would be a big help.
>> 
>> Thank you.
>> -- 
>> *Evan Williams*
>> Sr. Software Engineer
>> evan.williams@zapprx.com
>> 
>> *www.ZappRx.com <http://www.zapprx.com/>*
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@pdfbox.apache.org
> For additional commands, e-mail: users-help@pdfbox.apache.org
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@pdfbox.apache.org
For additional commands, e-mail: users-help@pdfbox.apache.org


Mime
View raw message