mozilla / pdf.js

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

"Segoe UI" TTF font render wrong #13312

Closed fletchsod-developer closed 3 years ago

fletchsod-developer commented 3 years ago

BuyersGuide_4_26_2021 12_00_31 PM.pdf Attach (recommended) or Link to PDF file here:

Configuration:

Steps to reproduce the problem: 1.PDF I'm attaching, open it in this JS PDF viewer (render wrong) 2.PDF I'm attaching, open it in Adobe Acrobat Reader DC (render correctly)

What is the expected behavior? (add screenshot)

"Segoe UI" font should render correctly in this JS PDF Viewer

What went wrong? (add screenshot)

"Segoe UI" font is render wrong in this JS PDF Viewer

Link to a viewer (if hosted on a site other than mozilla.github.io/pdf.js or as Firefox/Chrome extension):

Snuffleupagus commented 3 years ago

Your PDF document uses non-standard fonts, but doesn't embed any of them, which means that the PDF document itself is violating the PDF specification and it simply cannot be guaranteed that the document will render as intended in all viewers.

fletchsod-developer commented 3 years ago

Segoe UI is a TTF file that come with Windows 10, in the "C:\Windows\Fonts" folder. The "Quick PDF" software doesnt have the embedding API object

Snuffleupagus commented 3 years ago

Segoe UI is a TTF file that come with Windows 10,

That means that anything which isn't Windows will be, more or less, guaranteed to not render the PDF document correctly. Note that the whole point of the "Portable Document Format" is that files should be portable, and by not embedding fonts you're basically guaranteeing that problems can/will occur.

The "Quick PDF" software doesnt have the embedding API object

If a particular PDF generator cannot embed fonts correctly, that's a bug in that software.

timvandermeij commented 3 years ago

Closing since this is a duplicate of some of the issues in https://github.com/mozilla/pdf.js/issues?q=is%3Aopen+is%3Aissue+label%3A4-non-standard-fonts.