Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6386899
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T03:05:06+00:00 2026-05-25T03:05:06+00:00

I am using com.lowagie.text.FontFactory in generating a PDF file and am trying to use

  • 0

I am using com.lowagie.text.FontFactory in generating a PDF file and am trying to use a custom font, KozMinPro-Regular, which provides support for Japanese characters, as we have a need to support this. I have found examples from searching that show how to do this similar to how I am doing it below and these examples assume that UniJIS-UCS2-H encoding is supported but when I try this I am getting the exception below that says this encoding is not supported. I would appreciate if anyone may have any insight into this. Thanks

FontFactory.register("/usr/share/fonts/truetype/KozMinPro-Regular.ttf", "JapaneseCompatible");
contentFont = FontFactory.getFont("JapaneseCompatible", "UniJIS-UCS2-H", true, 11, Font.BOLD);
headerFont = FontFactory.getFont("JapaneseCompatible", "UniJIS-UCS2-H", true, 11, Font.BOLD);

The exception I get:

 Exception: [.ReportPdfView] Exception caught during generation of pdf file. Cause: UniJIS-UCS2-H
ExceptionConverter: java.io.UnsupportedEncodingException: UniJIS-UCS2-H
    at java.lang.StringCoding.encode(StringCoding.java:286)
    at java.lang.String.getBytes(String.java:954)
    at com.lowagie.text.pdf.PdfEncodings.convertToBytes(Unknown Source)
    at com.lowagie.text.pdf.TrueTypeFont.<init>(Unknown Source)
    at com.lowagie.text.pdf.BaseFont.createFont(Unknown Source)
    at com.lowagie.text.pdf.BaseFont.createFont(Unknown Source)
    at com.lowagie.text.pdf.BaseFont.createFont(Unknown Source)
    at com.lowagie.text.FontFactoryImp.getFont(Unknown Source)
    at com.lowagie.text.FontFactoryImp.getFont(Unknown Source)
    at com.lowagie.text.FontFactory.getFont(Unknown Source)
    at com.lowagie.text.FontFactory.getFont(Unknown Source)
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-25T03:05:07+00:00Added an answer on May 25, 2026 at 3:05 am

    You need iTextAsian.jar . It gives CJK support.

    see…

    http://itextpdf.sourceforge.net/ for earlier versions of iText or

    http://sourceforge.net/projects/itext/files/extrajars/ for later version of iText.(extrajars.zip contains iTextAsian.jar)

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

i'm building a UI using a com ports, and i'm trying to write labels
Hi I have created a PDF file with an image in it, I want
I'm using COM in Python and I want the object to run in background
I am calling a .Net assembly from a Delphi project using COM interop. Can
I trying to configure an XA DB2 DataSource, xa-datasource (based on http://community.jboss.org/wiki/SetUpADB2Datasource ) using
I have a java SAX parser which I would like to call multiple times
i'm using this snippet to check if an app/activity is installed: public static boolean
in the system console I would like to log only messages from com.foo.* and
Is there any alternatives to manipulate Microsoft Word document (2003 and above) without using
How I can work with Excel 2007 and Excel 2003 (Excel Chart) from win32

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.