Description
Attach (recommended) or Link to PDF file
I cannot share the document that this happens to as it belongs to a customer, I'll try to get back to you with a reproducible document.
Web browser and its version
'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/134.0.0.0 Safari/537.36'
Operating system and its version
macPS
PDF.js version
4.10.38
Is the bug present in the latest PDF.js version?
Yes
Is a browser extension
No
Steps to reproduce the problem
I get a runtime error for certain documents during rendering: kidDict.getRaw is not a function
. However, the document renders and works "just fine" for my needs.
I have tried to debug the error a bit and it happens on this line, because the line above kidDict = this.dict.xref.fetch(kid)
returns a number, 1
in my case, and not a Dict
object. I haven't followed the code enough to know what the number means, but it's certainly not the Dict
object we expect in the code path.

What is the expected behavior?
Not to issue a runtime error.
What went wrong?
Nothing, as far as I can see. There may be broken functionality we don't use, I dunno.
Link to a viewer
No response
Additional context
No response