PDFbox Using fallback font Helvetica for ZapfDingbats

Viewed 648

The error that I am getting is

2021-05-03 15:00:58.542  WARN 1 --- [nio-8099-exec-1] o.a.pdfbox.pdmodel.font.PDType1Font : Using fallback font Helvetica for ZapfDingbats
2021-05-03 15:00:58.542  WARN 1 --- [nio-8099-exec-1] o.apache.pdfbox.rendering.Type1Glyph2D : No glyph for code 52 (a20) in font ZapfDingbats

Had similar issue with Helvetica, but after reading a response here Pdf to image conversion using PdfBox
I added two missing fonts to /usr/local/fonts

(PDFbox is running on Docker and I am using openjdk:16-jdk-alpine3.12)

Helvetica issue was resolved, but issue with ZapfDingbats still continues.

Any ideas what I am doing wrong?

1 Answers

In this particular case, the issue was that Alpine Linux (inside the container) didn't have fonts that I required (Helvetica and ZapfDingbats).

Inside my docker file I had to add

RUN apk --update add fontconfig msttcorefonts-installer ghostscript-fonts  && \
update-ms-fonts && \
fc-cache -f -v

Msttcorefonts would solve my issue with Helvetica font and no glyph error and ghostscript-fonts would install Zapfdingbats.

Related