1
0
Fork 0
mirror of https://github.com/mozilla/pdf.js.git synced 2025-04-26 01:58:06 +02:00

Add support for radios printing

This commit is contained in:
Calixte Denizet 2020-07-22 17:29:35 +02:00
parent eb4d6a0652
commit 538017f7a7
3 changed files with 150 additions and 40 deletions

View file

@ -1078,16 +1078,19 @@ class ButtonWidgetAnnotation extends WidgetAnnotation {
if (!isDict(appearanceStates)) {
return;
}
const normalAppearanceState = appearanceStates.get("N");
if (!isDict(normalAppearanceState)) {
const normalAppearance = appearanceStates.get("N");
if (!isDict(normalAppearance)) {
return;
}
for (const key of normalAppearanceState.getKeys()) {
for (const key of normalAppearance.getKeys()) {
if (key !== "Off") {
this.data.buttonValue = key;
break;
}
}
this.checkedAppearance = normalAppearance.get(this.data.buttonValue);
this.uncheckedAppearance = normalAppearance.get("Off") || null;
}
_processPushButton(params) {