-
Notifications
You must be signed in to change notification settings - Fork 10.3k
The text is cut off on Japanese documents. #13343
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
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.
That's because you (apparently) have the necessary fonts installed locally, but unless you do it's even more broken in Adobe Reader (with nothing rendering) than in the PDF.js library. Please 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. |
Thank you for your reply. Let me ask you an additional question. Is it possible to specify the font in PDF.js? After receiving your reply, when I looked at the fonts from the PDF properties (by Adobe Reader), I found that the following fonts were used.
This is Morisawa's paid font. But when I check the fonts installed on my PC with Windows PowerShell The "actual font" of Adobe Reader is displayed as "KozGoPr6N-Medium" (Type 1 (CID)). In other words, the font that was not originally specified in this PDF can be viewed normally in Adobe Reader. (The PDFs presented are all publicly available Japanese patent publications and cannot be expected to be recreated by the creator.) |
No, the PDF.js library only renders what's present in the PDF document itself.
There's now a patch for this part of the issue, which should hopefully improve things overall. |
I haven't confirmed it yet, but thank you for your prompt response. |
It can be tested with the demo viewer, which always contains the latest changes (that haven't yet reached an official release): https://github.com/mozilla/pdf.js#online-demo
It's unfortunately quite unlikely that the patch will apply cleanly to PDF.js version |
I confirmed the fix! I really appreciate it. wonderful! Thank you! Thank you! Thank you! |
Attach (recommended) or Link to PDF file here:
jpa2021506744.pdf
Configuration:
Steps to reproduce the problem:
As you can see from the attached jpa2021506744 jpa2021506744.pdf page 15,
When using PDF.js, the text is cut off on Japanese documents.
What went wrong? I hope to solve this problem.
I tried to improve after seeing these pages.
#12110
#13067
Adobe Reader does not have this problem.
What is the expected behavior? (add screenshot)

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):
The text was updated successfully, but these errors were encountered: