Skip to content

[Bug]: Missing text later in PDF with probably broken font #19954

@nicolo-ribaudo

Description

@nicolo-ribaudo

Attach (recommended) or Link to PDF file

Capital Bancorp Inc Corporate Responsibility 2025509 SD000000003063823863-1-2.pdf

Web browser and its version

Firefox 140 (also tested in Chrome, I don't know which version)

Operating system and its version

Ubuntu 25.04 with x11

PDF.js version

5.2.133

Is the bug present in the latest PDF.js version?

Yes

Is a browser extension

No

Steps to reproduce the problem

Open the PDF and try to select some text

What is the expected behavior?

It should generate a text layer, because this PDF contains actual text and it's not just an image

What went wrong?

It does not generate a text layer. This is probably because there are some problems with the font used by the PDF:

Warning: loadFont - translateFont failed: "FormatError: invalid font name". [pdf.worker.mjs:323:13](resource://pdf.js/build/pdf.worker.mjs)
Warning: Error during font loading: invalid font name [pdf.mjs:323:13](resource://pdf.js/build/pdf.mjs)
Warning: loadFont - translateFont failed: "FormatError: invalid font name". [pdf.worker.mjs:323:13](resource://pdf.js/build/pdf.worker.mjs)
Warning: Error during font loading: invalid font name [pdf.mjs:323:13](resource://pdf.js/build/pdf.mjs)
Warning: loadFont - translateFont failed: "FormatError: invalid font name". [pdf.worker.mjs:323:13](resource://pdf.js/build/pdf.worker.mjs)
Warning: Error during font loading: invalid font name [pdf.mjs:323:13](resource://pdf.js/build/pdf.mjs)

Link to a viewer

No response

Additional context

Even though it seems like it's a problem with the PDF, both Chrome and the built-in PDF viewer in Ubuntu allow me to select the text.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions