You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@pdfbox.apache.org by Al Grant <bi...@gmail.com> on 2016/03/08 18:57:33 UTC

Fields and "]" + Checkboxes

Morning All,

I have been writing some Java with PDFBox for a few weeks now. Its been
very good so far.

My goal is to loop through all the fields in a form, grab the values and
write the value to a corresponding field in a DB. By and large I have this
working.

I however have two questions:

1. When importing the value of a combobox I am getting the value enclosed
in square braces. Anyone know why - or do I need to handle this
progmatically?

2. The code so far loops through all the fields and grabs strings - but I
am not sure how to handle exclusive checkboxes (ie only one value selected
allowed).

Cheers

-Al


-- 
"Beat it punk!"
- Clint Eastwood

Re: Fields and "]" + Checkboxes

Posted by Andreas Lehmkuehler <an...@lehmi.de>.
Am 10.03.2016 um 19:03 schrieb Al Grant:
> Andreas,
>
> I have read your reply now.
>
> So is there a method that gets the value without the braces or do I have to
> handle it progmatically?
You have to process the given list of strings yourself.

BR
Andreas
>
> Cheers
>
> -AL
>
>
> On Thu, Mar 10, 2016 at 11:58 AM, Al Grant <bigal.nz@gmail.com
> <ma...@gmail.com>> wrote:
>
>     Thanks Andreas.
>
>     On Wed, Mar 9, 2016 at 8:03 PM, Andreas Lehmkühler <andreas@lehmi.de
>     <ma...@lehmi.de>> wrote:
>
>         Hi,
>
>          > Al Grant <bigal.nz@gmail.com <ma...@gmail.com>> hat am 8.
>         März 2016 um 18:57 geschrieben:
>         >
>         >
>         > Morning All,
>         >
>         > I have been writing some Java with PDFBox for a few weeks now. Its been
>         > very good so far.
>         >
>         > My goal is to loop through all the fields in a form, grab the values and
>         > write the value to a corresponding field in a DB. By and large I have this
>         > working.
>         >
>         > I however have two questions:
>         >
>         > 1. When importing the value of a combobox I am getting the value enclosed
>         > in square braces. Anyone know why - or do I need to handle this
>         > progmatically?
>         getValue provides a list of strings as return value which leads to the
>         described
>         string presentation with square braces. That list contains the selected
>         value or
>         several values if multiselect is allowed and more than one value is
>         selected.
>
>         > 2. The code so far loops through all the fields and grabs strings - but I
>         > am not sure how to handle exclusive checkboxes (ie only one value selected
>         > allowed).
>         I didn't get your point, but hopefully my answer to your first question
>         answers
>         this one too? ;-)
>
>         > Cheers
>         >
>         > -Al
>         >
>         >
>         > --
>         > "Beat it punk!"
>         > - Clint Eastwood
>
>
>         BR
>         Andreas
>
>         ---------------------------------------------------------------------
>         To unsubscribe, e-mail: users-unsubscribe@pdfbox.apache.org
>         <ma...@pdfbox.apache.org>
>         For additional commands, e-mail: users-help@pdfbox.apache.org
>         <ma...@pdfbox.apache.org>
>
>
>
>
>     --
>     "Beat it punk!"
>     - Clint Eastwood
>
>
>
>
> --
> "Beat it punk!"
> - Clint Eastwood


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


Re: Fields and "]" + Checkboxes

Posted by Al Grant <bi...@gmail.com>.
Andreas,

I have read your reply now.

So is there a method that gets the value without the braces or do I have to
handle it progmatically?

Cheers

-AL


On Thu, Mar 10, 2016 at 11:58 AM, Al Grant <bi...@gmail.com> wrote:

> Thanks Andreas.
>
> On Wed, Mar 9, 2016 at 8:03 PM, Andreas Lehmkühler <an...@lehmi.de>
> wrote:
>
>> Hi,
>>
>> > Al Grant <bi...@gmail.com> hat am 8. März 2016 um 18:57 geschrieben:
>> >
>> >
>> > Morning All,
>> >
>> > I have been writing some Java with PDFBox for a few weeks now. Its been
>> > very good so far.
>> >
>> > My goal is to loop through all the fields in a form, grab the values and
>> > write the value to a corresponding field in a DB. By and large I have
>> this
>> > working.
>> >
>> > I however have two questions:
>> >
>> > 1. When importing the value of a combobox I am getting the value
>> enclosed
>> > in square braces. Anyone know why - or do I need to handle this
>> > progmatically?
>> getValue provides a list of strings as return value which leads to the
>> described
>> string presentation with square braces. That list contains the selected
>> value or
>> several values if multiselect is allowed and more than one value is
>> selected.
>>
>> > 2. The code so far loops through all the fields and grabs strings - but
>> I
>> > am not sure how to handle exclusive checkboxes (ie only one value
>> selected
>> > allowed).
>> I didn't get your point, but hopefully my answer to your first question
>> answers
>> this one too? ;-)
>>
>> > Cheers
>> >
>> > -Al
>> >
>> >
>> > --
>> > "Beat it punk!"
>> > - Clint Eastwood
>>
>>
>> BR
>> Andreas
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@pdfbox.apache.org
>> For additional commands, e-mail: users-help@pdfbox.apache.org
>>
>>
>
>
> --
> "Beat it punk!"
> - Clint Eastwood
>
>



-- 
"Beat it punk!"
- Clint Eastwood

Re: Fields and "]" + Checkboxes

Posted by Al Grant <bi...@gmail.com>.
Thanks Andreas.

On Wed, Mar 9, 2016 at 8:03 PM, Andreas Lehmkühler <an...@lehmi.de> wrote:

> Hi,
>
> > Al Grant <bi...@gmail.com> hat am 8. März 2016 um 18:57 geschrieben:
> >
> >
> > Morning All,
> >
> > I have been writing some Java with PDFBox for a few weeks now. Its been
> > very good so far.
> >
> > My goal is to loop through all the fields in a form, grab the values and
> > write the value to a corresponding field in a DB. By and large I have
> this
> > working.
> >
> > I however have two questions:
> >
> > 1. When importing the value of a combobox I am getting the value enclosed
> > in square braces. Anyone know why - or do I need to handle this
> > progmatically?
> getValue provides a list of strings as return value which leads to the
> described
> string presentation with square braces. That list contains the selected
> value or
> several values if multiselect is allowed and more than one value is
> selected.
>
> > 2. The code so far loops through all the fields and grabs strings - but I
> > am not sure how to handle exclusive checkboxes (ie only one value
> selected
> > allowed).
> I didn't get your point, but hopefully my answer to your first question
> answers
> this one too? ;-)
>
> > Cheers
> >
> > -Al
> >
> >
> > --
> > "Beat it punk!"
> > - Clint Eastwood
>
>
> BR
> Andreas
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@pdfbox.apache.org
> For additional commands, e-mail: users-help@pdfbox.apache.org
>
>


-- 
"Beat it punk!"
- Clint Eastwood

Re: Fields and "]" + Checkboxes

Posted by Andreas Lehmkühler <an...@lehmi.de>.
Hi,

> Al Grant <bi...@gmail.com> hat am 8. März 2016 um 18:57 geschrieben:
> 
> 
> Morning All,
> 
> I have been writing some Java with PDFBox for a few weeks now. Its been
> very good so far.
> 
> My goal is to loop through all the fields in a form, grab the values and
> write the value to a corresponding field in a DB. By and large I have this
> working.
> 
> I however have two questions:
> 
> 1. When importing the value of a combobox I am getting the value enclosed
> in square braces. Anyone know why - or do I need to handle this
> progmatically?
getValue provides a list of strings as return value which leads to the described
string presentation with square braces. That list contains the selected value or
several values if multiselect is allowed and more than one value is selected.

> 2. The code so far loops through all the fields and grabs strings - but I
> am not sure how to handle exclusive checkboxes (ie only one value selected
> allowed).
I didn't get your point, but hopefully my answer to your first question answers
this one too? ;-)

> Cheers
> 
> -Al
> 
> 
> -- 
> "Beat it punk!"
> - Clint Eastwood


BR
Andreas

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