Hi, Using Apache PDFBox 3.0.3 to create Free Text Annotation that contains text in Greek, we've come across a problem and would appreciate your help.
1. First we tried to use: annotation.setDefaultAppearance("/Helvetica 10 Tf 0 0 0 rg"); Calling annotation.constructAppearances(document); it throws the following exception: SEVERE: java.io.IOException: java.lang.IllegalArgumentException: U+0394 ('Deltagreek') is not available in the font Helvetica, encoding: WinAnsiEncoding 2. Next, we tried to use a custom font (Verdana-Bold), having checked that it contains the Greek character set. PDType0Font font = PDType0Font.load(document, Annotator.class.getResourceAsStream("/verdanab.ttf")); page.getResources().add(font); annotation.setDefaultAppearance("/Verdana-Bold 10 Tf 0 0 0 rg"); Calling font.getBaseFont() returns "Verdana-Bold". Calling annotation.constructAppearances(document); it throws the same exception about Helvetica. It seems that the tool insists on using Helvetica instead of the chosen font. Acrobat Reader displays the Annotation text but using other readers the text appears corrupted or is not displayed at all. Any idea or recommendation is welcomed. Thank you for your time. Best regards, Thomas Thoma