Using "Save to PDF" corrupts glyph in other PDF viewers
Categories
(Firefox :: PDF Viewer, defect, P1)
Tracking
()
Tracking | Status | |
---|---|---|
firefox140 | --- | fixed |
People
(Reporter: laurenz.stampfl+github, Assigned: calixte)
References
Details
Attachments
(3 files)
User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:137.0) Gecko/20100101 Firefox/137.0
Steps to reproduce:
I have a simple PDF file "original.pdf" which displays fine in any PDF viewer. I opened the PDF in Firefox and resaved it by pressing "Print" and "Save to PDF".
Actual results:
The resaved PDF still displays fine when opening in Firefox, but when trying any other viewer (Chrome, Apple Preview and Acrobat), the first glyph suddenly ends up being displayed as a .notdef glyph.
Expected results:
The text should still display fine in any PDF viewer.
Reporter | ||
Comment 1•29 days ago
|
||
Comment 2•29 days ago
|
||
The Bugbug bot thinks this bug should belong to the 'Firefox::PDF Viewer' component, and is moving the bug to that component. Please correct in case you think the bot is wrong.
Hello, thank you for the bug report!
Managed to reproduce this issue using:
- Firefox Nightly 139.0a1;
- Firefox 138.0;
Tested on macOS 14. Could not reproduce on Windows 10 (with Adobe Acrobat Reader) or Ubuntu 22 (with Document Viewer).
Setting as NEW so the developing team can have a look.
Assignee | ||
Comment 4•23 days ago
•
|
||
The used font is a CFF one and we rewrite it a bit in order to make it usable in Firefox.
The last version of ttx
was failing and a way to fix the failure is to change the nLeft
value here:
https://github.com/mozilla/pdf.js/blob/91175dc67d13addbc0c172858fb87bae8c8212af/src/core/cff_parser.js#L1769-L1779
which is supposed to be the number of glyphs in the range except the first one.
And fixing the ttx
failure is fixing this bug in Firefox too.
Comment 5•23 days ago
|
||
Updated•18 days ago
|
Description
•