mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-23 08:38:06 +02:00
Merge pull request #16915 from calixteman/issue16914
Construct the correct field name and strip out classes when searching
This commit is contained in:
commit
3e32d87be7
3 changed files with 18 additions and 6 deletions
|
@ -1284,12 +1284,7 @@ class Annotation {
|
|||
}
|
||||
|
||||
if (loopDict.has("T")) {
|
||||
const t = stringToPDFString(loopDict.get("T"));
|
||||
if (!t.startsWith("#")) {
|
||||
// If it starts with a # then it's a class which is not a concept for
|
||||
// datasets elements (https://www.pdfa.org/norm-refs/XFA-3_3.pdf#page=96).
|
||||
fieldName.unshift(t);
|
||||
}
|
||||
fieldName.unshift(stringToPDFString(loopDict.get("T")));
|
||||
}
|
||||
}
|
||||
return fieldName.join(".");
|
||||
|
|
|
@ -354,6 +354,11 @@ class SimpleDOMNode {
|
|||
}
|
||||
|
||||
const component = paths[pos];
|
||||
if (component.name.startsWith("#") && pos < paths.length - 1) {
|
||||
// If it starts with a # then it's a class which is not a concept for
|
||||
// datasets elements (https://www.pdfa.org/norm-refs/XFA-3_3.pdf#page=96).
|
||||
return this.searchNode(paths, pos + 1);
|
||||
}
|
||||
const stack = [];
|
||||
let node = this;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue