Hi,

Thank you.

My computer doesn't have Adobe installed, and I use another PDF software.
I've only used that software along with Chrome and Edge for viewing PDFs,
so I assumed all software could render PDFs correctly.

I hadn't tried Adobe, which was my oversight. I apologize for taking up
your time.

I will be testing with other JARs in the future to see if I can resolve the
issue. If it works, I will report back to everyone.

Once again, thank you for the time and effort you spent helping me resolve
this issue.

Tilman Hausherr <thaush...@t-online.de> 于2025年2月11日周二 18:22写道:

> Hi,
>
> It does not display properly in PDFBox, but it displays properly in
> Chrome / Edge. It fails in Firefox, Adobe Reader, Ghostscript and PDF
> X-Change.
>
> Having the font in windows doesn't help because your font is embedded
> and readable in DTL OTMaster 3.7 light. Something goes wrong when
> getting the correct glyph (for example, 佰 is present at position 9067 /
> CFF id CID10010 / unicode 0x4f70 but isn't shown by PDFBox). An
> indication that something is wrong are these messages:
>
> Warning  [PDFontFactory] Try to fix different descendant font types for
> font AAAAAA+NotoSansSC-Regular
> Warning  [PDFontFactory] Try to fix different descendant font types for
> font BAAAAA+NotoSansSC-Bold
>
> Considering that "gold standard" Adobe fails to render this file, is it
> really needed to find out why? My theory is that Chrome uses some sort
> of map despite that the file has "identity", and that PDFBox searches
> for CID9067 which is at position 8301 and has no glyph.
>
> Tilman
>
>
> On 11.02.2025 10:37, 李一凡 wrote:
> > I have uploaded the file to a website that doesn't require
> > registration. I've tested it, and it should be downloadable. Here is
> > the download link to the file.https://f2h.io/4k128j9za8nn
> > I'm not sure if there is an expiration date, so please download it as
> > soon as possible. Apologies for the inconvenience, and thank you!
> >
> > Tilman Hausherr<thaush...@t-online.de> 于2025年2月11日周二 15:50写道:
> >> Hi,
> >> Attachments don't get posted. Please upload your PDF to a sharehoster
> >> that doesn't require registration.
> >> Tilman
> >>
> >> On 11.02.2025 07:30, 李一凡 wrote:
> >>> 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
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail:users-unsubscr...@pdfbox.apache.org
> > For additional commands, e-mail:users-h...@pdfbox.apache.org
> >
>

Reply via email to