Tilman, Here is some additional logging that I was able to capture. It looks like it's trying to use Carlito, and actually succeeds for some of the text on the page. It seems like the text that's stored as "Identity-H" is the problem?
2023-04-06 14:05:51,138 [admin] [53088500EB38627B70BCA6FA9037CD0C] [172.18.0.1] [service={}] DEBUG [catalina-exec-1] (FontMapperImpl.java:469) - getFont('TTF','LiberationMono') returns LiberationMono (TTF, mac: 0x0, os/2: 0x805, cid: null) /usr/share/fonts/liberation-mono/LiberationMono-Regular.ttf 2023-04-06 14:05:51,152 [admin] [53088500EB38627B70BCA6FA9037CD0C] [172.18.0.1] [service={}] DEBUG [catalina-exec-1] (FileSystemFontProvider.java:196) - Loaded LiberationMono from /usr/share/fonts/liberation-mono/LiberationMono-Regular.ttf 2023-04-06 14:05:51,245 [admin] [53088500EB38627B70BCA6FA9037CD0C] [172.18.0.1] [service={}] DEBUG [catalina-exec-1] (FontMapperImpl.java:469) - getFont('TTF','Calibri-Regular') returns Calibri-Regular (TTF, mac: 0x0, os/2: 0x0, cid: null) /usr/share/fonts/fonts_compat/ms/Calibri/Carlito-Regular.ttf 2023-04-06 14:05:51,245 [admin] [53088500EB38627B70BCA6FA9037CD0C] [172.18.0.1] [service={}] DEBUG [catalina-exec-1] (FileSystemFontProvider.java:196) - Loaded Calibri-Regular from /usr/share/fonts/fonts_compat/ms/Calibri/Carlito-Regular.ttf 2023-04-06 14:05:51,293 [admin] [53088500EB38627B70BCA6FA9037CD0C] [172.18.0.1] [service={}] DEBUG [catalina-exec-1] (FontMapperImpl.java:469) - getFont('TTF','CalibriBold') returns Calibri-Bold (TTF, mac: 0x1, os/2: 0x0, cid: null) /usr/share/fonts/fonts_compat/ms/Calibri/Carlito-Bold.ttf 2023-04-06 14:05:51,294 [admin] [53088500EB38627B70BCA6FA9037CD0C] [172.18.0.1] [service={}] DEBUG [catalina-exec-1] (FileSystemFontProvider.java:196) - Loaded Calibri-Bold from /usr/share/fonts/fonts_compat/ms/Calibri/Carlito-Bold.ttf 2023-04-06 14:05:51,732 [admin] [53088500EB38627B70BCA6FA9037CD0C] [172.18.0.1] [service={}] DEBUG [catalina-exec-10] (FontMapperImpl.java:469) - getFont('TTF','LiberationMono') returns LiberationMono (TTF, mac: 0x0, os/2: 0x805, cid: null) /usr/share/fonts/liberation-mono/LiberationMono-Regular.ttf 2023-04-06 14:05:51,736 [admin] [53088500EB38627B70BCA6FA9037CD0C] [172.18.0.1] [service={}] DEBUG [catalina-exec-10] (FontMapperImpl.java:469) - getFont('TTF','Calibri-Regular') returns Calibri-Regular (TTF, mac: 0x0, os/2: 0x0, cid: null) /usr/share/fonts/fonts_compat/ms/Calibri/Carlito-Regular.ttf 2023-04-06 14:05:51,739 [admin] [53088500EB38627B70BCA6FA9037CD0C] [172.18.0.1] [service={}] DEBUG [catalina-exec-10] (FontMapperImpl.java:469) - getFont('TTF','CalibriBold') returns Calibri-Bold (TTF, mac: 0x1, os/2: 0x0, cid: null) /usr/share/fonts/fonts_compat/ms/Calibri/Carlito-Bold.ttf 2023-04-06 14:05:51,850 [admin] [53088500EB38627B70BCA6FA9037CD0C] [172.18.0.1] [service={}] DEBUG [catalina-exec-7] (FontMapperImpl.java:469) - getFont('TTF','LiberationMono') returns LiberationMono (TTF, mac: 0x0, os/2: 0x805, cid: null) /usr/share/fonts/liberation-mono/LiberationMono-Regular.ttf 2023-04-06 14:05:51,852 [admin] [53088500EB38627B70BCA6FA9037CD0C] [172.18.0.1] [service={}] DEBUG [catalina-exec-7] (FontMapperImpl.java:469) - getFont('TTF','Calibri-Regular') returns Calibri-Regular (TTF, mac: 0x0, os/2: 0x0, cid: null) /usr/share/fonts/fonts_compat/ms/Calibri/Carlito-Regular.ttf 2023-04-06 14:05:51,855 [admin] [53088500EB38627B70BCA6FA9037CD0C] [172.18.0.1] [service={}] DEBUG [catalina-exec-7] (FontMapperImpl.java:469) - getFont('TTF','CalibriBold') returns Calibri-Bold (TTF, mac: 0x1, os/2: 0x0, cid: null) /usr/share/fonts/fonts_compat/ms/Calibri/Carlito-Bold.ttf 2023-04-06 14:05:53,318 [admin] [53088500EB38627B70BCA6FA9037CD0C] [172.18.0.1] [service={}] WARN [catalina-exec-7] (PDCIDFontType2.java:242) - Using non-embedded GIDs in font Calibri On Wed, May 24, 2023 at 2:34 PM Tilman Hausherr <thaush...@t-online.de> wrote: > Hi, > > The problem is the PDF itself, it references a font that isn't embedded. > PDFBox then tries to find such a font on the local system. > > To confirm this, (temporarly) copy the calibri font from another system > to the linux system. If it works, buy the calibri font. If not, delete it. > > Is there more log output? You mention "Given that we have to substitute > Carlito for Calibri, this may be relevant." Does PDFBoox attempt to use > Carlito for Calibri? > > Tilman > > On 24.05.2023 17:28, Daniel Skiles wrote: > > All, > > I'm trying to convert a PDF to an image and I'm encountering problems > with > > some font rendering on some Linux systems. If anyone could provide any > > ideas on how to fix this I'd appreciate it. > > > > The PDF is too large to attach, so it's available at this link: > > > https://drive.google.com/file/d/1dNXgHsfn0cy2Gx9HxhSTQdeWAAjaDplk/view?usp=sharing > > > > So far as I can tell, the attached file comes from some sort of mail > > merge-style application that is injecting text into a template. The > > injected text uses a different font than the rest of the document. > > > > On Windows systems, this works fine, but on Linux systems, PDFBox renders > > the text as gibberish glyphs in a way that I've never seen before. > > > > When I reproduce the issue with logging increased to trace, I get the > > following line in the log. > > > > 15:55:15.622 [main] WARN org.apache.pdfbox.pdmodel.font.PDCIDFontType2 - > > Using non-embedded GIDs in font Calibri > > > > When I list the fonts in the PDF, Calibri is listed as both an embedded > > *and *an Identity-H font. Given that we have to substitute Carlito for > > Calibri, this may be relevant. > > > > In the source code > > < > https://github.com/apache/pdfbox/blob/d6ebddf07f99bcc04f5b106c84623048b697bee7/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/font/PDCIDFontType2.java#L241 > >, > > a comment line suggests there's a mismatch that involves GIDs, CIDs, and > > embedded vs non-embedded fonts. > > > > Has anyone here ever seen behavior like this before? Is this a bug? If > it > > is a bug, what is the procedure to report it? > > > > If it's not a bug, does anyone have any suggestions on what I might need > to > > fix in my environment? > > > > Any input that anyone might have would be helpful. > > > > Thank you, > > Daniel > > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscr...@pdfbox.apache.org > For additional commands, e-mail: users-h...@pdfbox.apache.org > >