IMHO the only bug is that a setter can set an illegal option.
The rest looks fine to me, a user should know what field they are filling. Tilman Am 16.08.2021 um 18:10 schrieb Oliver Degener:
Hi, I'm using PDFBox to automatically fill in all kinds of PDF documents. Recently, I was seeing the following error message with a new PDF: 'The list box does not allow multiple selections.' I saw in the code that the PDChoice field can be single-select or multi-select. With single-select fields, the setter that takes a list of choices [0] throws an exception whenever the given list is not empty. Therefore I now have to use the general setter from PDField [1] which does not check whether the provided option is valid (selectable). It would be great if the setter from [0] would also work for single-select choices and would only throw an exception if the list's size is greater than 1. Any thoughts on this? Thanks & Regards Oliver [0] https://pdfbox.apache.org/docs/2.0.3/javadocs/org/apache/pdfbox/pdmodel/interactive/form/PDChoice.html#setValue(java.util.List) [1] https://pdfbox.apache.org/docs/2.0.3/javadocs/org/apache/pdfbox/pdmodel/interactive/form/PDChoice.html#setValue(java.lang.String) --------------------------------------------------------------------- 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]

