Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: Font fallback does not work on node-js/legacy build #19234

Closed
siddarth opened this issue Dec 17, 2024 · 2 comments · Fixed by #19236
Closed

[Bug]: Font fallback does not work on node-js/legacy build #19234

siddarth opened this issue Dec 17, 2024 · 2 comments · Fixed by #19236

Comments

@siddarth
Copy link

Attach (recommended) or Link to PDF file

Tax3921.pdf

Web browser and its version

NodeJS

Operating system and its version

NodeJS

PDF.js version

latest

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

Yes

Is a browser extension

No

Steps to reproduce the problem

  1. Clone pdfjs/install deps.
  2. Run the example pdf2png against this PDF:
npm install
gulp dist-install
node pdf2png.mjs /tmp/Tax3921.pdf

What is the expected behavior?

Expect the pdf to be rendered as an image in ./output.png. Should look something like:

image

What went wrong?

node pdf2png.mjs /tmp/Tax3921.pdf
# PDF document loaded.
Warning: getPathGenerator - ignoring character: "Error: Requesting object that isn't resolved yet HelveticaLTStd_path_F.".
Warning: getPathGenerator - ignoring character: "Error: Requesting object that isn't resolved yet HelveticaLTStd_path_i.".
Warning: getPathGenerator - ignoring character: "Error: Requesting object that isn't resolved yet HelveticaLTStd_path_n.".
Warning: getPathGenerator - ignoring character: "Error: Requesting object that isn't resolved yet HelveticaLTStd_path_a.".
Warning: getPathGenerator - ignoring character: "Error: Requesting object that isn't resolved yet HelveticaLTStd_path_c.".
Warning: getPathGenerator - ignoring character: "Error: Requesting object that isn't resolved yet HelveticaLTStd_path_l.".
Warning: getPathGenerator - ignoring character: "Error: Requesting object that isn't resolved yet HelveticaLTStd_path_ .".
Warning: getPathGenerator - ignoring character: "Error: Requesting object that isn't resolved yet HelveticaLTStd_path_I.".
Warning: getPathGenerator - ignoring character: "Error: Requesting object that isn't resolved yet HelveticaLTStd_path_t.".
Warning: getPathGenerator - ignoring character: "Error: Requesting object that isn't resolved yet HelveticaLTStd_path_e.".
Warning: getPathGenerator - ignoring character: "Error: Requesting object that isn't resolved yet HelveticaLTStd_path_g.".
Warning: getPathGenerator - ignoring character: "Error: Requesting object that isn't resolved yet HelveticaLTStd_path_A.".
Warning: getPathGenerator - ignoring character: "Error: Requesting object that isn't resolved yet HelveticaLTStd_path_s.".
Warning: getPathGenerator - ignoring character: "Error: Requesting object that isn't resolved yet HelveticaLTStd_path_o.".
Warning: getPathGenerator - ignoring character: "Error: Requesting object that isn't resolved yet HelveticaLTStd_path_1.".
Warning: getPathGenerator - ignoring character: "Error: Requesting object that isn't resolved yet HelveticaLTStd_path_2.".
Warning: getPathGenerator - ignoring character: "Error: Requesting object that isn't resolved yet HelveticaLTStd_path_0.".
Warning: getPathGenerator - ignoring character: "Error: Requesting object that isn't resolved yet HelveticaLTStd_path_S.".
Warning: getPathGenerator - ignoring character: "Error: Requesting object that isn't resolved yet HelveticaLTStd_path_u.".
Warning: getPathGenerator - ignoring character: "Error: Requesting object that isn't resolved yet HelveticaLTStd_path_d.".
Warning: getPathGenerator - ignoring character: "Error: Requesting object that isn't resolved yet HelveticaLTStd_path_w.".
Warning: getPathGenerator - ignoring character: "Error: Requesting object that isn't resolved yet HelveticaLTStd_path_V.".
Warning: getPathGenerator - ignoring character: "Error: Requesting object that isn't resolved yet HelveticaLTStd_path_y.".
Warning: getPathGenerator - ignoring character: "Error: Requesting object that isn't resolved yet HelveticaLTStd_path_D.".
Warning: getPathGenerator - ignoring character: "Error: Requesting object that isn't resolved yet HelveticaLTStd_path_r.".
Warning: getPathGenerator - ignoring character: "Error: Requesting object that isn't resolved yet HelveticaLTStd_path_3.".
Warning: getPathGenerator - ignoring character: "Error: Requesting object that isn't resolved yet HelveticaLTStd_path_R.".
Warning: getPathGenerator - ignoring character: "Error: Requesting object that isn't resolved yet HelveticaLTStd_path_,.".
Warning: getPathGenerator - ignoring character: "Error: Requesting object that isn't resolved yet HelveticaLTStd_path_9.".
Warning: getPathGenerator - ignoring character: "Error: Requesting object that isn't resolved yet HelveticaLTStd_path_-.".
Warning: getPathGenerator - ignoring character: "Error: Requesting object that isn't resolved yet HelveticaLTStd_path_4.".
Warning: getPathGenerator - ignoring character: "Error: Requesting object that isn't resolved yet HelveticaLTStd_path_5.".
Warning: getPathGenerator - ignoring character: "Error: Requesting object that isn't resolved yet HelveticaLTStd_path_6.".
Warning: getPathGenerator - ignoring character: "Error: Requesting object that isn't resolved yet HelveticaLTStd_path_7.".
Warning: getPathGenerator - ignoring character: "Error: Requesting object that isn't resolved yet HelveticaLTStd_path_8.".
Warning: getPathGenerator - ignoring character: "Error: Requesting object that isn't resolved yet HelveticaLTStd_path_x.".
Warning: getPathGenerator - ignoring character: "Error: Requesting object that isn't resolved yet HelveticaLTStd_path_K.".
Warning: getPathGenerator - ignoring character: "Error: Requesting object that isn't resolved yet HelveticaLTStd_path_Q.".
Warning: getPathGenerator - ignoring character: "Error: Requesting object that isn't resolved yet HelveticaLTStd_path_P.".
Warning: getPathGenerator - ignoring character: "Error: Requesting object that isn't resolved yet HelveticaLTStd_path_b.".
Warning: getPathGenerator - ignoring character: "Error: Requesting object that isn't resolved yet HelveticaLTStd_path_M.".
Warning: getPathGenerator - ignoring character: "Error: Requesting object that isn't resolved yet HelveticaLTStd_path_N.".
Warning: getPathGenerator - ignoring character: "Error: Requesting object that isn't resolved yet HelveticaLTStd_path_Y.".
Warning: getPathGenerator - ignoring character: "Error: Requesting object that isn't resolved yet HelveticaLTStd_path_/.".

Warning: getPathGenerator - ignoring character: "Error: Requesting object that isn't resolved yet HelveticaLTStd_path_..".
Finished converting first page of PDF file to a PNG image.

output

Notice how the blue text is all empty.

Link to a viewer

N/A

Additional context

This seems like an old bug that's been lurking around: #11677

That also appears to be an IRS form w the same font.

@Snuffleupagus
Copy link
Collaborator

A PR has been submitted, but for future reference:

Web browser and its version

NodeJS

Please remember to state the version number as well, since that's often relevant.

Operating system and its version

NodeJS

Well, that's not really an operating system :-)

PDF.js version

latest

Again, please state the actual version number since "latest" is ambiguous given that its meaning changes over time (as new versions are released).

@siddarth
Copy link
Author

siddarth commented Dec 18, 2024

@Snuffleupagus Thanks, will do going forward! For posterity:

  • node version: v22.9.0
  • OS: MacOS 14.5
  • PDF.js version: v4.9.155

Thanks again for your help on this one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants