|
|
An example solution is as follows:
String[] values = {"1", "2", "3"};
String[] options = {"One", "Two", "Three"};
TextField text = new TextField(writer, new Rectangle(50, 700, 120, 715), "cmbTest");
text.setChoices(options);
text.setChoiceExports(values);
text.setChoiceSelection(0);
PdfFormField combo = text.getComboField();
combo.setFieldFlags(67108864); // Setting bit 27 = value of 2^26
writer.addAnnotation(combo);
Thank you for your question; it led me in the right direction.
|