Part of the Chinese character cannot be rendered
See original GitHub issueAttach (recommended) or Link to PDF file here: pdf link
Configuration:
- Web browser and its version: chrome 86.0.4240.193
- Operating system and its version: macOS 10.13.6
- PDF.js version: 2.5.207
- Is a browser extension: -
Steps to reproduce the problem:
- use the getDocument api to render the pdf
- getDocument options:
{
url: 'https://zhihu-live.zhimg.com/pdf/20201112/origin/ac8b5907e1cf5ee7cada8650bbf1082d.pdf'
cMapUrl: 'https://unpkg.com/browse/pdfjs-dist@2.6.347/cmaps/',
cMapPacked: true
}
What is the expected behavior? (add screenshot) expect render normal
What went wrong? (add screenshot)
Link to a viewer (if hosted on a site other than mozilla.github.io/pdf.js or as Firefox/Chrome extension): no
Issue Analytics
- State:
- Created 3 years ago
- Comments:7
Top Results From Across the Web
Chinese Fonts Rendering Problem on Windows 10 Pro (English)
In some places, the Chinese characters are not rendering correctly. For example, file names containing Chinese in the File Explorer, characters ...
Read more >How to make sure Chinese text is rendered in webpage?
Your first Chinese word will be coded as 你好嗎 . These coded characters will show any browser, regardless of the encoding ...
Read more >Chinese characters not being rendered on JSP - Stack Overflow
jsp through mainserverlet and in this case, it renders the "editable" text in chinese properly. The second case is when i change the...
Read more >Inconsistent rendering of Chinese characters - Bugzilla@Mozilla
Expected results: Chinese characters should be should rendered in a uniform way. ... Why can't Firefox guess the best font to use if...
Read more >Some Chinese characters are shown as not recognized when ...
How to reproduce: 1. Open attached project "UIElement_test.zip" 2. Open "SampleScene" scene 3. Enter Play Mode 4. Observe rendered c...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
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
yep, I noticed that too
https://unpkg.com/browse/pdfjs-dist@2.6.347/cmaps/GBK-EUC-H.bcmap
This url actually returned an HTML, not abCmap
resource… : )💥So the solution is to replace cMapUrl with
https://cdn.jsdelivr.net/npm/pdfjs-dist@2.5.207/cmaps/
Thank you very much for your help!!😁 😬That suggests that the issue could be that the CDN is returning incorrect/malformed data, which we unfortunately cannot do anything about here since the CDN is provided by a third-party. Another possible explanation could be that you’re using a CORS policy which somehow breaks the CMap-requests, and in that case you could maybe try using a custom
CMapReaderFactory
to work-around that.