Error when loading PDF that uses system fonts
See original GitHub issueTest file: https://dl.dropboxusercontent.com/u/16283445/PORTRAIT.pdf
File was produced by Muhimbi PDF converter.
Main text (that uses embedded Tahoma font) renders ok; it is the trial message on top of the file that causes the error. After some debugging, I’ve found that this message references system Helvetica font, and somehow glyphs for it are missing at the time of error.
Error log:
Error: Requesting object that isn't resolved yet Helvetica_path_T pdf.js:205
at error (http://[skipped]/pdfjs/pdf.js:207:15)
at Object.PDFObjects_get [as get] (http://[skipped]/pdfjs/pdf.js:4640:9)
at Object.FontFace.getPathGenerator (http://[skipped]/pdfjs/pdf.js:7675:23)
at Object.CanvasGraphics.paintChar (http://[skipped]/pdfjs/pdf.js:6105:26)
at Object.CanvasGraphics_showText [as showText] (http://[skipped]/pdfjs/pdf.js:6291:18)
at Object.CanvasGraphics_nextLineShowText [as nextLineShowText] (http://[skipped]/pdfjs/pdf.js:6381:12)
at Object.CanvasGraphics_executeOperatorList [as executeOperatorList] (http://[skipped]/pdfjs/pdf.js:5600:22)
at Object.InternalRenderTask__next [as _next] (http://[skipped]/pdfjs/pdf.js:4807:39)
at Object.pdfViewcContinueCallback [as continueCallback] (http://[skipped]/pdfjs/viewer.js:4261:9)
Issue Analytics
- State:
- Created 10 years ago
- Reactions:27
- Comments:35 (2 by maintainers)
Top Results From Across the Web
When you create a PostScript file you must rely on system ...
While creating a PDF, you get an error When you create a PostScript file you must rely on system fonts and use document...
Read more >Change-Pro is showing an Adobe PDF error “Rely on system ...
Right click your Adobe PDF printer and pick Printing Preferences; Uncheck “Rely on system fonts only; do not use document Fonts”; Click on...
Read more >How to solve common font issues in editable PDFs
STEP 1: CHECK THAT THE FONTS HAVE BEEN EMBEDDED · Open the PDF in Adobe Reader · Right click on the PDF and...
Read more >How to Fix the "Windows PDF Printer Error: Invalid Font When ...
5. Re-Install or Repair Your PDF Reader in the System Settings ... If you're using alternative PDF readers to Adobe Reader, then you...
Read more >PDF Font Mapping | 5 Reasons Fonts Don't Display Right
Using the perfect font can make or break the impact a document has. Fonts are also complicated. If you have a PDF file...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
That’s not really true since the vast majority of PDF files simply embed their fonts (or a subset), in which case there is no problem at all. In fact, that’s highly recommended everywhere, also in the PDF specification, since it ensures that PDF files render consistently across viewers and platforms. By not embedding (a subset of the) fonts you simply cannot assume that the file will look correctly in all viewers, so that’s taking a risk.
You have to realize that this is not a trivial issue, and in the meantime work has been done to investigate how we can resolve this. There is a pull request just above (#12726) that aims to provide an implementation for this. While not completely done yet, there is effort being put into this.
If you think this issue deserves more attention, use the thumbs up emoji on the original comment so it shows up higher in the priority list (see https://github.com/mozilla/pdf.js/issues?q=is%3Aissue+sort%3Areactions-%2B1-desc+is%3Aclosed for issues that have been solved that also had a high number of thumbs up), but please keep comments constructive at all times.
with
pdfjs-dist": "^2.2.2
setdisableFontFace: false
fixed this issue on me.