pdfbox-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Daniel King <dk...@halogensoftware.com>
Subject Supporting multiple languages, including CJK
Date Wed, 12 Oct 2016 12:24:10 GMT
Hi,

I'm attempting to write text to a PDF in situations where I need to support multiple languages
on a single PDF. This may include regular latin characters as well as CJK characters. I've
tried many attempts to do this and have it load the character sets from the OS without much
success. The farthest I have gotten is support latin characters, some russian and I believe
Vietnamese characters founds on the embedded fonts example here https://svn.apache.org/viewvc/pdfbox/trunk/examples/src/main/java/org/apache/pdfbox/examples/pdmodel/EmbeddedFonts.java?view=markup

I'm doing a similar approach from the example but I believe I'm using the FileSystemFontProvider
provided by the FontMappers class by doing something such as

TrueTypeFont ttf = FontMappers.instance().getTrueTypeFont("Arial", null).getFont();
PDFont font = PDType0Font.load(signatureDocument, ttf.getOriginalData());

As I mentioned I seem to be able to support the text in the EmbeddedFonts example but can't
seem to determine how I can also support CJK. I'm currently using 2.0.2 of PDFBox but could
potentially upgrade to 2.0.3 if that would help at all.

Thanks for the help,
Dan

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message