You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
(node:7452) TypeError: Cannot read property '0' of undefined
at SimpleDOMNode.get (...\node_modules\pdfjs-dist\build\pdf.js:14097:29)
at Metadata._parse (...\node_modules\pdfjs-dist\build\pdf.js:13740:19)
at new Metadata (...\node_modules\pdfjs-dist\build\pdf.js:13698:12)
at ...\pdfjs-dist\build\pdf.js:9421:34
at <anonymous>
at process._tickCallback (internal/process/next_tick.js:188:7)
I believe the following line of code is the line with the bug:
@dhollenbeck Would it be possible to provide a test case without sensitive data here as well like you did for the other issue? Either a file or the XML itself is fine. This would allow us to add a unit test for this so we can avoid regressions in the future, and allow us to verify the fix.
When getMetadata() is invoked on a specific PDF file, which I can not provide:
I get the following error:
I believe the following line of code is the line with the bug:
pdf.js/src/display/xml_parser.js
Lines 280 to 282 in 2ce489c
Obviously,
this.childNodes
could be undefined as is the case with my pdf file. It is being invoked via an automatic property get function above:pdf.js/src/display/metadata.js
Line 77 in 66ffdc4
The offending XML document has the structure of:
The text was updated successfully, but these errors were encountered: