charllemagne.villacampaesc Posted August 1, 2023 Posted August 1, 2023 Data: "tradeNames": [ "บริษัท เมืองใหม่ กัตทรี จำกัด (มหาชน) - [永鈞有限公司] [엠에스컴퍼니]" ]Jaspersoft Studio: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.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. Also tried adding the Arial Unicode.jar and adding fonts to preferences but to no avail.Since I'm just new to Jasper Reports, please advise on1. how to resolve the missing non-English characters2. how/where Jaspersoft Studio is getting the font when exporting to pdf3. 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-charactershttps://community.jaspersoft.com/questions/509785/could-not-load-font-locationhttps://community.jaspersoft.com/questions/542599/how-dynamic-display-asian-fonts-jasperreports
anish.rai Posted August 1, 2023 Posted August 1, 2023 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.
Jivan Phadtare Posted August 1, 2023 Posted August 1, 2023 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-extensionhttps://community.jaspersoft.com/wiki/embedding-and-exporting-different-foreign-languages-fonts-hindi-japanese-korean-russian-and Hope this will find you useful !!
charllemagne.villacampaesc Posted August 11, 2023 Author Posted August 11, 2023 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 .settingsAfter 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-INFlibI 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
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now