Jump to content

Recommended Posts

Posted

converted-file.png.166422ee38c4eba567b810078466bda5.png

Data:

      "tradeNames": [

        "บริษัท เมืองใหม่ กัตทรี จำกัด (มหาชน) - [永鈞有限公司] [엠에스컴퍼니]"

      ]

Jaspersoft Studio:

converted-file.png.d55f86fe0a3f6d34d7a8f63f60edee3d.png

As shown above, the text in red in json is not properly shown in jasper preview.

When exported to PDF, all non-English characters are not shown.

converted-file.png.ce523ac176c3323f73653d58fc2aeb22.png

Tried adding the pdf properties, e.g. <font fontName="Arial_New" isBold="false" pdfFontName="Arial_New" pdfEncoding="Identity-H" isPdfEmbedded="true"/>, but is getting "Could not load the following font" similar to the following links.

 converted-file.png.ba0873d7fd19103e7c97aed3866aad34.png

Also tried adding the Arial Unicode.jar and adding fonts to preferences but to no avail.

converted-file.png.c9acaf86a5d9abc8f78132b4008fe352.png

converted-file.png.fd91d327dad982c9454c918f6159d658.png

Since I'm just new to Jasper Reports, please advise on

1. how to resolve the missing non-English characters

2. how/where Jaspersoft Studio is getting the font when exporting to pdf

3. share the basic flow on how to add and use the fonts, properties, etc.

 

Related Liks:

https://community.jaspersoft.com/questions/802732/jasper-pdf-shows-koreanthaisimplified-chinesetraditional-chinese-characters

https://community.jaspersoft.com/questions/509785/could-not-load-font-location

https://community.jaspersoft.com/questions/542599/how-dynamic-display-asian-fonts-jasperreports

  • Replies 3
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Posted Images

Posted


Thank you for posting to the Jaspersoft Community. Our team of experts has read your question and we are working to get you an answer as quickly as we can. If you have a Jaspersoft Professional Subscription plan, please visit https://support.tibco.com/s/ for direct access to our technical support teams offering guaranteed response times.

Posted

Hello,

To print non-English characters in exported pdf file you have to add custom font for non-English characters which are in json.

To gain a comprehensive understanding for incorporating custom fonts into the exported PDF file, we recommend referring to the following resources:

https://community.jaspersoft.com/wiki/custom-font-font-extension
https://community.jaspersoft.com/wiki/embedding-and-exporting-different-foreign-languages-fonts-hindi-japanese-korean-russian-and 

Hope this will find you useful !!

  • 2 weeks later...
Posted

Hi jphadtar, thank you for the response. 

I already tried adding the custom font extension as shown in my screenshot above but still not fixed until I deleted the com.jaspersoft.studio.prefs file in .settings

After this, I was able to view all the non-English characters using ArialUnicodeMS font in Jaspersoft Studio and export to pdf. 

But then I faced another issue in adding the extension jar file to BOOT-INFlib

I did another round of search and found this article https://thegeekyasian.com/add-custom-fonts-to-jasper-report-in-java-project-jaspersoft .

The current implementation is the same as per the link so I reverted the updates on font extension and used back the custom font and updated the font to  ArialUnicodeMS.

Using the custom font fixed the non-English character issue in the server but not in Jaspersoft Studio.

 Summary:

1. If want to view the report or export to pdf in Jaspersoft Studio, can use the font extension (https://community.jaspersoft.com/wiki/custom-font-font-extension).

2. Once confirmed in #1 that the font can support the non-English characters, then can use the font in the application by publishing the font as per #1 or can do using custom font as per https://thegeekyasian.com/add-custom-fonts-to-jasper-report-in-java-project-jaspersoft

 

 

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...