mozilla / pdf.js

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

disableFontFace is not working properly as in older Versions #11865

Closed deepak-ghimire closed 4 years ago

deepak-ghimire commented 4 years ago

Hi Team, We develop a 3D flipbook using PDF.js. Recently while integrating a newer version of PDF.js we encountered fontface issues, which would normally happen when using a IOS device. disableFontFaceis auto set to true in those IOS devices. Unfortunately, it's working properly as it used to. Are we missing something extra to implement?

Live Scenario:

Attach (recommended) or Link to PDF file here: The-Angels-Magazine-April-2020.pdf

Configuration:

Steps to reproduce the problem:

  1. Goto Link: https://dearflip.com/pdf-viewer/
  2. Check "Disable FontFace(IOS issues)" checkbox ( see screenshot)
  3. Open the attached PDF (The-Angels-Magazine-April-2020.pdf)

PDF js fontface - old vs new - settings

For custom environment: set disabledFontFace = true and use the attached PDF

What is the expected behavior? The text should be displayed as it was displayed using older versions. (right side of the screenshot below)

What went wrong? (add screenshot) The text is not displayed in new versions of PDF.js. (Left side of the below screenshot) PDF js fontface - old vs new

Link to a viewer (if hosted on a site other than mozilla.github.io/pdf.js or as Firefox/Chrome extension): New version of PDF.js with fontface issues: https://dearflip.com/pdf-viewer/

Old Version of PDF.js that doesn't have the issue: https://dearflip.com/examples/jquery/demo-open-file.html

Best, DearFlip Team

Snuffleupagus commented 4 years ago

Duplicate of #4244