You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@pdfbox.apache.org by Ronit Kadwane <ro...@jumpbyte.com> on 2017/06/09 11:16:44 UTC

How to set multiple option in PDListBox?

I am using PDFBox library to set the Values in PDF.

code block through I am trying to set values in ListBox

PDListBox listBox = (PDListBox) field;if (listBox.isMultiSelect()) {
  List<String> list = Arrays.asList("option 1","option 2");
  listBox.setValue(list);}

in result it shows only first value is selected from List<String> in PDF.
check result here https://i.stack.imgur.com/HvxU8.png .

How can I set multiple value selected in PDF?

Re: How to set multiple option in PDListBox?

Posted by Tilman Hausherr <TH...@t-online.de>.
Am 09.06.2017 um 13:16 schrieb Ronit Kadwane:
> I am using PDFBox library to set the Values in PDF.
>
> code block through I am trying to set values in ListBox
>
> PDListBox listBox = (PDListBox) field;if (listBox.isMultiSelect()) {
>    List<String> list = Arrays.asList("option 1","option 2");
>    listBox.setValue(list);}
>
> in result it shows only first value is selected from List<String> in PDF.
> check result here https://i.stack.imgur.com/HvxU8.png .
>
> How can I set multiple value selected in PDF?
>

https://issues.apache.org/jira/browse/PDFBOX-3828

try a snapshot:

https://repository.apache.org/content/groups/snapshots/org/apache/pdfbox/pdfbox-app/2.0.7-SNAPSHOT/


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


Re: How to set multiple option in PDListBox?

Posted by Tilman Hausherr <TH...@t-online.de>.
Am 09.06.2017 um 13:16 schrieb Ronit Kadwane:
> I am using PDFBox library to set the Values in PDF.
>
> code block through I am trying to set values in ListBox
>
> PDListBox listBox = (PDListBox) field;if (listBox.isMultiSelect()) {
>    List<String> list = Arrays.asList("option 1","option 2");
>    listBox.setValue(list);}
>
> in result it shows only first value is selected from List<String> in PDF.
> check result here https://i.stack.imgur.com/HvxU8.png .
>
> How can I set multiple value selected in PDF?
>

Could you please upload your PDF file somewhere?


Tilman


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