I am experiencing a weird error in PdfBox 2.0.20 (+Boxable 1.5) when using NumberFormat to get the € symbol on one machine. On other machines it works with no issues though.
NumberFormat currencyFormatter = NumberFormat.getCurrencyInstance(Locale.GERMANY);
BaseTable table = new BaseTable(...);
Row<PDPage> row = table.createRow(10f);
row.createCell(20, currencyFormatter.format(9.99));
float rowHeight = row.getHeight();
This works fine on 3+ machines for more than 2 years now. On a new pc I get an error on the last line when the height gets accessed:
java.lang.IllegalArgumentException: U+00A0 ('nbspace') is not available in this font Helvetica encoding: WinAnsiEncoding
The error message is weird to me. I did not use the U+00A0 symbol and I think the issue is related to the € symbol. When I use Locale.US on the new pc, it uses $ and the error disappears. I want to be able to use the german currency though.
Updating pdfBox to 2.0.22 fixed the problem.
https://mvnrepository.com/artifact/org.apache.pdfbox/pdfbox/2.0.22