Hello, I am currently using JDK17 and pdfbox-2.0.33.jar to convert PDFs into images on a Windows 10 system.
My PDF uses the NotoSansSC-Regular font, and it displays Chinese characters correctly in browsers and any PDF software. However, when using PDFBox to convert the PDF to an image, only the numbers are displayed correctly, and all other Chinese characters are rendered as garbled text. I have already ensured that the font is properly installed on my machine (the font file is NotoSansSC-Regular.ttf, downloaded from the official Google website <https://fonts.google.com/noto/specimen/Noto+Sans+SC?hl=zh-cn&query=noto+sans+sc>). However, after installing it on Windows, the font name appears as "Noto Sans SC Regular" rather than "NotoSansSC-Regular." I debugged the program and found that the font is located on line 109 of the PDCIDFontType0.java file. However, there is a warning: WARN org.apache.pdfbox.rendering.CIDType0Glyph2D - No glyph for 16393 (CID 4009) in font AAAAAA+NotoSansSC-Regular. So my question is: Is it possible that the "NotoSansSC-Regular" font used in the test.pdf is not valid? What steps should I take to ensure that it uses the "Noto Sans SC Regular" font from my Windows system directly? Thank you for your help.
--------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@pdfbox.apache.org For additional commands, e-mail: users-h...@pdfbox.apache.org