Skip to content

[Bug]: UnknownErrorException 'kidDict.getRaw is not a function' #19694

Closed
@gsamokovarov

Description

@gsamokovarov

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.

Image

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions