jsPDF
jsPDF copied to clipboard
Chrome draws border around Checkbox and RadioButton
For Checkbox and RadioButton that are initially in the Off
state, Chrome draws thin borders around them. Those border will
then disappear if I clicks on them.
I suppose those fields should not have border around them.
/* global jsPDF */
var doc = new jsPDF();
var {
ComboBox,
ListBox,
CheckBox,
PushButton,
TextField,
PasswordField,
RadioButton,
Appearance
} = jsPDF.AcroForm;
doc.setFontSize(12);
doc.text("CheckBox:", 10, 125);
var checkBox = new CheckBox();
checkBox.fieldName = "CheckBox1";
checkBox.Rect = [50, 120, 30, 10];
doc.addField(checkBox);
checkBox.appearanceState = 'Off'
doc.text("RadioGroup:", 50, 135);
var radioGroup = new RadioButton();
radioGroup.value = "Test";
radioGroup.Subtype = "Form";
doc.addField(radioGroup);
var radioButton1 = radioGroup.createOption("Test");
radioButton1.Rect = [50, 140, 30, 10];
radioButton1.AS = "/Test";
var radioButton2 = radioGroup.createOption("Test2");
radioButton2.Rect = [50, 150, 30, 10];
var radioButton3 = radioGroup.createOption("Test3");
radioButton3.Rect = [50, 160, 20, 10];
radioGroup.setAppearance(Appearance.RadioButton.Cross);