mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-25 09:38:06 +02:00
[Annotations] Add support for printing/saving choice list with multiple selections
- it aims to fix issue #12189.
This commit is contained in:
parent
0dd6bc9a85
commit
ad3fb71a02
7 changed files with 355 additions and 33 deletions
|
@ -143,7 +143,11 @@ function writeXFADataForAcroform(str, newRefs) {
|
|||
}
|
||||
const node = xml.documentElement.searchNode(parseXFAPath(path), 0);
|
||||
if (node) {
|
||||
node.childNodes = [new SimpleDOMNode("#text", value)];
|
||||
if (Array.isArray(value)) {
|
||||
node.childNodes = value.map(val => new SimpleDOMNode("value", val));
|
||||
} else {
|
||||
node.childNodes = [new SimpleDOMNode("#text", value)];
|
||||
}
|
||||
} else {
|
||||
warn(`Node not found for path: ${path}`);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue