PDFfill service fails to write Latin2 characters

Hi,

my apps fail on multiple Volt servers running Linux when a PDFfill service shall write a Latin2 character such as ř (rcaron) into a PDF file. For Latin1 everything works. The issue is caused by java.lang.IllegalArgumentException in PDFBox, which is a Java library that Volt uses to handle PDF files.

Caused by: java.lang.IllegalArgumentException: U+0159 is not available in this font's encoding: WinAnsiEncoding
at org.apache.pdfbox.pdmodel.font.PDTrueTypeFont.encode(PDTrueTypeFont.java:394)
at org.apache.pdfbox.pdmodel.font.PDFont.encode(PDFont.java:333)
at org.apache.pdfbox.pdmodel.font.PDFont.getStringWidth(PDFont.java:364)

I tried multiple fonts, different font types, installed the same font file on my desktop (for Acrobat) and on the server, examined the font files with FontForge, tried multiple PDF standards etc. Nothing works. There is no difference if I embed the font into PDF or not and there is no way how to force a particular font encoding in a PDF file.

IMO the problem is that PDFBox library can not use local fonts (on linux). The project FAQ says only this:

I'm getting java.lang.IllegalArgumentException: ... is not available in this font's encoding: WinAnsiEncoding

Check whether the character is available in WinAnsiEncoding by looking at the PDF Specification Appendix D. If not, but if it is available in this font (in windows, have a look with charmap.exe), then load the font with PDType0Font.load(), see also in the EmbeddedFonts.java example in the source code download.

I have a support case open but there was no significant progress in two weeks.

Has anybody solved this issue in the past, please?

If you run Volt on linux, can you write characters like ř or č into a PDF forms using whatever font you like?

I have limited experience with non-ascii characters, but am trying to investigate this. Let's connect if you are available.

To whom it may concern: this issue has been resolved in 1.0.5.0_30 and requires an additional setting 'disablePdfboxAppearancesUpdate' set to true in VoltConfig.nsf