mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-22 16:18:08 +02:00
Interactive forms: make choice widget options inheritable (issue 8094)
Even though the PDF specification does not state that `Opt` fields are inheritable, in practice there are PDF generators that let annotations inherit the options from a parent.
This commit is contained in:
parent
da08b801a5
commit
8990de8614
2 changed files with 32 additions and 1 deletions
|
@ -845,9 +845,12 @@ var ChoiceWidgetAnnotation = (function ChoiceWidgetAnnotationClosure() {
|
|||
// the display value. If the array consists of strings, then these
|
||||
// represent both the export and display value. In this case, we convert
|
||||
// it to an array of arrays as well for convenience in the display layer.
|
||||
// Note that the specification does not state that the `Opt` field is
|
||||
// inheritable, but in practice PDF generators do make annotations
|
||||
// inherit the options from a parent annotation (issue 8094).
|
||||
this.data.options = [];
|
||||
|
||||
var options = params.dict.get('Opt');
|
||||
var options = Util.getInheritableProperty(params.dict, 'Opt');
|
||||
if (isArray(options)) {
|
||||
var xref = params.xref;
|
||||
for (var i = 0, ii = options.length; i < ii; i++) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue