Please have a look at the CreateCheckBox.java example. This is done with
the PDAppearanceCharacteristicsDictionary:
PDAppearanceCharacteristicsDictionary appearanceCharacteristics = new
PDAppearanceCharacteristicsDictionary(new COSDictionary());
appearanceCharacteristics.setBorderColour(new PDColor(new float[]{1, 0,
0}, PDDeviceRGB.INSTANCE)); // red
appearanceCharacteristics.setBackground(new PDColor(new float[]{1, 1,
0}, PDDeviceRGB.INSTANCE)); // yellow
widget.setAppearanceCharacteristics(appearanceCharacteristics);
These values are then used when the appearance streams are created.
Tilman
Am 20.09.2019 um 09:20 schrieb Baskar Murugan:
Hi Team,
Is there any other class files are there to change the border / fill the
background of the checkbox which is in pdf form filed. I need to highlight
fields either form field / check box field. I changed the background color
for the text box but I couldn't able to change the background color for the
check box. Is there any other way to change background color and color for
check box?. If any help on this would be greatly appreciated...
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@pdfbox.apache.org
For additional commands, e-mail: users-h...@pdfbox.apache.org