Skip to content

PDF text not correctly rendered #7625

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

Open
Woodgnome opened this issue Sep 12, 2016 · 4 comments
Open

PDF text not correctly rendered #7625

Woodgnome opened this issue Sep 12, 2016 · 4 comments

Comments

@Woodgnome
Copy link

Er æstetik en løftestang for læring.pdf

Configuration:

  • Web browser and its version: Google Chrome 52.0.2743.116
  • Operating system and its version: Microsoft Windows 10 v1607
  • PDF.js version: 1.5.452

Steps to reproduce the problem:

  1. Open attached PDF in latest public demo of PDF.js

What is the expected behavior?
As rendered in Google Chrome PDF viewer: http://i.imgur.com/LXDR9VD.png

What went wrong?
As rendered in PDF.js: http://i.imgur.com/r9FwrN5.png

I should probably add that my Acrobat is not able to correctly render the PDF either, so it may be a case of the PDF document simply being too mangled to fix (or maybe a missing font).

@Snuffleupagus
Copy link
Collaborator

PDF 86084efb634c2241847af0c784588e26 [1.6 Adobe PDF Library 9.9 / Adobe InDesign CS5 (7.0)] (PDF.js: 1.5.452)  viewer.js:7984:7
Warning: Not enough parameters for hhcurveto; actual: 0, expected: 4  pdf.worker.js:1263:5
Warning: Not enough parameters for hvcurveto; actual: 3, expected: 4 pdf.worker.js:1263:5
Warning: Not enough parameters for hvcurveto; actual: 2, expected: 4  pdf.worker.js:1263:5
Warning: Not enough parameters for hvcurveto; actual: 3, expected: 4 pdf.worker.js:1263:5
Warning: Not enough parameters for rcurveline; actual: 2, expected: 8  pdf.worker.js:1263:5
Warning: Found too many parameters for stack-clearing command  pdf.worker.js:1263:5
Warning: Not enough parameters for hstem; actual: 1, expected: 2  pdf.worker.js:1263:5
Warning: Not enough parameters for rcurveline; actual: 3, expected: 8  pdf.worker.js:1263:5
Warning: Not enough parameters for hvcurveto; actual: 3, expected: 4 pdf.worker.js:1263:5
Warning: Not enough parameters for vhcurveto; actual: 2, expected: 4  pdf.worker.js:1263:5
Warning: Not enough parameters for hhcurveto; actual: 0, expected: 4  pdf.worker.js:1263:5
Warning: Not enough parameters for hvcurveto; actual: 2, expected: 4  pdf.worker.js:1263:5
Warning: Not enough parameters for hhcurveto; actual: 2, expected: 4  pdf.worker.js:1263:5
Warning: Not enough parameters for hvcurveto; actual: 3, expected: 4  pdf.worker.js:1263:5
Warning: Not enough parameters for vvcurveto; actual: 3, expected: 4  pdf.worker.js:1263:5
Warning: Not enough parameters for rmoveto; actual: 0, expected: 2  pdf.worker.js:1263:5
Warning: Not enough parameters for vlineto; actual: 0, expected: 1  pdf.worker.js:1263:5
Warning: Not enough parameters for hvcurveto; actual: 3, expected: 4  pdf.worker.js:1263:5
Warning: Not enough parameters for rcurveline; actual: 3, expected: 8  pdf.worker.js:1263:5
Warning: Not enough parameters for rmoveto; actual: 1, expected: 2  pdf.worker.js:1263:5
Warning: Not enough parameters for vhcurveto; actual: 0, expected: 4  pdf.worker.js:1263:5
downloadable font: CFF: Failed validating charstring set 0 (font-family: "g_d0_f3" style:normal weight:normal stretch:normal src index:0) source: (invalid URI)  (unknown)
downloadable font: rejected by sanitizer (font-family: "g_d0_f3" style:normal weight:normal stretch:normal src index:0) source: (invalid URI)  (unknown)
downloadable font: font load failed (font-family: "g_d0_f3" style:normal weight:normal stretch:normal src index:0) source: (invalid URI)  (unknown)
Warning: Failed to load font ""g_d0_f3"": SyntaxError: An invalid or illegal string was specified  pdf.js:277:5

@timvandermeij
Copy link
Contributor

The sanitizer warnings are gone, but the rendering problems remain unfortunately.

@sandeepsuthari
Copy link

Did this issue get resolved in the recent versions of pdf.js?

@timvandermeij
Copy link
Contributor

It's not yet fixed, in fact, it looks much worse for me on Linux/Firefox than on the screenshots above (see my screenshot below), but with largely the same (perhaps a bit more specific) sanitizer errors:

PDF 110dd61fd57444010b1ab5ff38782f0f [1.4 pdfeTeX-1.21a / TeX] (PDF.js: 2.6.266) app.js:1386:4
PDF 86084efb634c2241847af0c784588e26 [1.6 Adobe PDF Library 9.9 / Adobe InDesign CS5 (7.0)] (PDF.js: 2.6.266) app.js:1386:4
Warning: Not enough parameters for hhcurveto; actual: 0, expected: 4 pdf.worker.js:1097:13
Warning: Not enough parameters for hvcurveto; actual: 3, expected: 4 2 pdf.worker.js:1097:13
Warning: Not enough parameters for hvcurveto; actual: 2, expected: 4 pdf.worker.js:1097:13
Warning: Not enough parameters for hvcurveto; actual: 3, expected: 4 2 pdf.worker.js:1097:13
Warning: Not enough parameters for rcurveline; actual: 2, expected: 8 pdf.worker.js:1097:13
Warning: Found too many parameters for stack-clearing command pdf.worker.js:1097:13
Warning: Not enough parameters for hstem; actual: 1, expected: 2 pdf.worker.js:1097:13
Warning: Not enough parameters for rcurveline; actual: 3, expected: 8 pdf.worker.js:1097:13
Warning: Not enough parameters for hvcurveto; actual: 3, expected: 4 2 pdf.worker.js:1097:13
Warning: Not enough parameters for vhcurveto; actual: 2, expected: 4 pdf.worker.js:1097:13
Warning: Not enough parameters for hhcurveto; actual: 0, expected: 4 pdf.worker.js:1097:13
Warning: Not enough parameters for hvcurveto; actual: 2, expected: 4 pdf.worker.js:1097:13
Warning: Not enough parameters for hhcurveto; actual: 2, expected: 4 pdf.worker.js:1097:13
Warning: Not enough parameters for hvcurveto; actual: 3, expected: 4 pdf.worker.js:1097:13
Warning: Not enough parameters for vvcurveto; actual: 3, expected: 4 pdf.worker.js:1097:13
Warning: Not enough parameters for rmoveto; actual: 0, expected: 2 pdf.worker.js:1097:13
Warning: Not enough parameters for vlineto; actual: 0, expected: 1 pdf.worker.js:1097:13
Warning: Not enough parameters for hvcurveto; actual: 3, expected: 4 pdf.worker.js:1097:13
Warning: Not enough parameters for rcurveline; actual: 3, expected: 8 pdf.worker.js:1097:13
Warning: Not enough parameters for rmoveto; actual: 1, expected: 2 pdf.worker.js:1097:13
Warning: CFF stem hints are in wrong order pdf.worker.js:1097:13
Warning: Not enough parameters for vhcurveto; actual: 0, expected: 4 pdf.worker.js:1097:13
Warning: Failed to load font 'g_d1_f3': 'SyntaxError: An invalid or illegal string was specified'. util.js:337:4
downloadable font: CFF : Failed validating CharStrings INDEX (font-family: "g_d1_f3" style:normal weight:400 stretch:100 src index:0) source: (invalid URI)
downloadable font: CFF : Failed to parse table (font-family: "g_d1_f3" style:normal weight:400 stretch:100 src index:0) source: (invalid URI)
downloadable font: rejected by sanitizer (font-family: "g_d1_f3" style:normal weight:400 stretch:100 src index:0) source: (invalid URI)
downloadable font: font load failed (font-family: "g_d1_f3" style:normal weight:400 stretch:100 src index:0) source: (invalid URI)

7625

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

No branches or pull requests

4 participants