operasoftware / pdf.js

PDF Reader in JavaScript
Apache License 2.0
20 stars 4 forks source link

Math generated by LaTeX not rendered correctly #20

Closed zmwangx closed 10 years ago

zmwangx commented 10 years ago

I found a math paper generated by LaTeX that is rendered correctly in Firefox 27.0.1 (on OS X 10.9.2) with PDF Viewer 0.8.649, but not in Opera 20.0.1387.64, Opera Next 20.0.1387.59, or Opera Developer 21.0.1419.0 with PDF Viewer 0.8.1067.

Most noticeably, many fraction lines and top bars of square root signs are missing. See page 9 Proposition 7 for both effects.

Not sure about the cause, but according to Document Properties:

Creator: LaTeX with hyperref package PDF Producer: dvips + GPL Ghostscript GIT PRERELEASE 9.05 PDF Version: 1.4

zmwangx commented 10 years ago

I've been paying special attention after spotting the issue. It turns out that this issue is not localized; it arises in a wide range of math documents generated by different versions and flavors of LaTeX.

Rob--W commented 10 years ago

Could you report the issue at Mozilla's bug tracker (https://github.com/pdf.js/mozilla/pdf.js)?

For the record, I do see the equality signs, but the sub text under the summation mark looks a bit weird (in Firefox and Chromium, on Linux). This only happens at certain zoom levels:

pdfjs-bad-math-under-summation

zmwangx commented 10 years ago

No problem with equality signs, but rather fraction lines and top bars of square root signs: fraction lines and top bars of square root signs missing (Opera on OS X) And indeed, it is a problem at certain zoom levels (I didn't realize this before you pointed it out, thanks).

Things look fine in Chromium and Firefox in OS X, no problem with zoom (unless I zoom out to the extent that texts are barely legible). I haven't tested in Linux since all my Linux VMs are CLI only.

Speaking of reporting, should I report it in Mozilla's repo while the issue I spotted seems to be Opera specific? (I can't reproduce the strange summation symbols you see in Firefox, and it seems to be a separate issue.)

Rob--W commented 10 years ago

Speaking of reporting, should I report it in Mozilla's repo while the issue I spotted seems to be Opera specific? (I can't reproduce the strange summation symbols you see in Firefox, and it seems to be a separate issue.)

Yes. Opera does not develop PDF.js. so if you want to see a bug in PDF.js's engine to be fixed, report it to Mozilla's repository.

In your bug report, please mention the relevant browsers, Operating systems, the zoom level (and window/screen size if you think that it's relevant), whether HWA is enabled. And include a link to a PDF file that will stick around for a while, plus a screenshot where the issue is clearly visible.

zmwangx commented 10 years ago

Reported in Mozilla.

zmwangx commented 10 years ago

Fixed. https://github.com/mozilla/pdf.js/issues/4436