mozilla / pdf.js

PDF Reader in JavaScript
https://mozilla.github.io/pdf.js/
Apache License 2.0
48.62k stars 10k forks source link

Scrambled fonts with World Chlorine Council PDF #10232

Open uswoods opened 6 years ago

uswoods commented 6 years ago

https://worldchlorine.org/wp-content/themes/brickthemewp/pdfs/WCC_Policy_Paper_Water_Chlorination.pdf

Configuration:

Steps to reproduce the problem:

  1. Open page

Result: screenshot_2018-11-07 wcc_policy_paper_water_chlorination pdf

timvandermeij commented 6 years ago

I can reproduce this on Arch Linux with Firefox 63.0.1 (64-bit). I think the file is somewhat corrupt given the console logs:

Warning: Indexing all PDF objects pdf.worker.js:961:5
PDF 6c655ef4c750453994376a7cffe75877 [1.4 Adobe PDF Library 8.0 / Adobe InDesign CS3 (5.0.1)] (PDF.js: 2.0.775) viewer.js:1044:7
Warning: decodeScan - unexpected MCU data, current marker is: 4ab pdf.worker.js:961:5
Warning: Not enough parameters for vhcurveto; actual: 0, expected: 4 pdf.worker.js:961:5
Warning: Not enough parameters for hmoveto; actual: 0, expected: 1 pdf.worker.js:961:5
Warning: Not enough parameters for hvcurveto; actual: 0, expected: 4 pdf.worker.js:961:5
Warning: Not enough parameters for rcurveline; actual: 1, expected: 8 pdf.worker.js:961:5
Warning: Not enough parameters for hvcurveto; actual: 3, expected: 4 pdf.worker.js:961:5
Warning: Not enough parameters for rrcurveto; actual: 5, expected: 6 pdf.worker.js:961:5
Warning: Not enough parameters for hstemhm; actual: 1, expected: 2 pdf.worker.js:961:5
Warning: Not enough parameters for hvcurveto; actual: 0, expected: 4 pdf.worker.js:961:5
Warning: Out of bounds subrIndex for callgsubr pdf.worker.js:961:5
Warning: Not enough parameters for rlineto; actual: 0, expected: 2 pdf.worker.js:961:5
Warning: Not enough parameters for rmoveto; actual: 0, expected: 2 pdf.worker.js:961:5
Warning: Not enough parameters for rlineto; actual: 1, expected: 2 pdf.worker.js:961:5 
THausherr commented 6 years ago

Adobe Reader shows bad images and an error message on page 1.

timvandermeij commented 6 years ago

Indeed, the image is also bad in PDF.js, which is probably explained by the Warning: decodeScan - unexpected MCU data, current marker is: 4ab line above. Thank you; marking this as a corrupt PDF file for now.