

The characters are not rendered correctly (some of them are missing and the ones displayed does not match the input).

Simply put Chinese characters inside the text field without changing anything. Only the last one works so far: Classic generation I would also have to do the same for many other languages.Īs far as I understood, PDFBox should be able to use any fonts installed on the server.īelow is a test class that tries 3 different approaches. I was able to make this work but I had to manually load the font in the code and add it to the PDF (see examples below).īut that is not a solution as it means that I would have to load the font every time and add it the the PDF. So i guess it is able to find the font and use it. PDFBox doesn't display any error (if I remove the SimSun font from my server then PDFBox fallback on another font that is not able to render the characters). I have the font SimSun installed on my server. This font handle Simplified Chinese characters. In the PDF file, I specified the SimSun font for the field using Adobe Pro. When I generated the PDF, I don't have any errors in the logs but the rendered text is absolutely not the same. I am writing a Java code which fill PDF Forms using PDFBox with some user inputs.
