I ran a report through iReport which consists of data in Japanese. When I preview it, through internal Preview, I am able to the see the data in Japanese. But when i do a PDF Preview, none of the Japanese characters are visible.
I use iReport 4.1.1. I installed Adobe Reader 9.
Can anyone suggest me how can I get the japanese fonts in PDF.
Waiting for the reply.
Do you set "iTextAsian.jar" to classpath ?
And configure font and encode.
Japanese font : "HeiseiKakuGo-W5" or "HeiseiMin-W3"
Japanese encode : "UniJIS-UCS2-H", "UniJIS-UCS2-V", "UniJIS-UCS2-HW-H" or "UniJIS-UCS2-HW-V"
Related
I have downloaded PMingLiu.ttf from
https://www.wfonts.com/font/pmingliu
and then install through Jaspersoft studio widnow > perference, then I set a textfield font to the new installed font (PMingLiu)
when preview, the characters changes to strange characters, why?
If choose PMingLiu beneath the dash (PMingLiu installed in my operating system), then the character can show properly, but cannot show in exported pdf, or I must use the PMingLiu in my Windows system and use that ttf as font extensions?
I have a question regarding the font used in pdf and docx formats when printing from a JasperReports jrxml. I followed the instructions defined http://community.jaspersoft.com/wiki/custom-font-font-extension to get the JasperReports report to print Arial font in both pdf and docx prints. The pdfs happily accepted this and are printing Arial. But no matter what I try, the docx prints always show up as Sans Serif font.
I also already edited the JasperReports property lines as follows:
net.sf.jasperreports.default.font.name = ArialExtension (Name of my extension, as created by following the links documentation, jar file)
net.sf.jasperreports.default.pdf.font.name = ArialExtension
So, as I understand, JasperReports should always pick Arial as font which it doesn't. I frankly don't know what to do now. We need pdf and docx prints available for our customers and we need them in Arial font.
Can someone point me in another direction or tell me, what I am missing.
I fixed the problem! The solution is absolutely not obvious and might not work for everyone. But for me, the correct font was used in DOCX and PDF format when I named my font extension exactly like the font I want to use. So instead of ArialExtension, I called it Arial and my jar was called Arial.jar. Then the font in DOCX was correct, also in PDF.
When trying to copy paste some Chinese characters in a HTML file open in Dreamweaver I see that its being represented as boxes. When I view the pave on a browser I can see the characters correctly so its just in Dreameaver that they don't show up.
I read some posts on S.O. about utf-8 and saving with BOM disabled.I have even included Chinese on my keyboard with no luck.
edit. I tried editing the Fonts in Edit>Preferences to Chinese but when I click OK and I go back to it it shows Unicode again.
I could just copy and paste everything and it will work but it would be easier if I can see the different characters so when I need to hyperlink some word or include it in a tag I dont have to count boxes and view on the browser to figure it out.
I found out what was the problem. It was an encoding issue on Dreamweaver.
Went to Modify>Page Properties>Title/Encoding and changed the encoding to Chinese.
The Unicode showed up boxes in Dreamweaver.
However if you have already text copied in then they might not turn to the actual characters correctly so you have to re-enter them or if you didn't enter anything text yet its ok.
I have this simple tabular report with many columns with different types .
But when printing the report with rtf (word) extension
the columns with numbers or date appears on the report.
the columns with with Arabic content appear on the report.
But when printing the report with PDF extension
the columns with numbers or date appears on the report.
the columns with with Arabic content DOES NOT appear on the report.
I have tried many different fonts and changed properties like PDF embed and PDF encoding.
What is the right way to do this ?
I faced this problem and its very annoying so to make it clear to all here how you do this
on the field or label that may has Arabic content go to its properties by right click or on the properties pallet of it , and make these changes
Check the box PDF embed
Choose Identity-H (Unicode with horizontal writing) from PDF encoding
Choose the font Arial if not there add it to the jasper fonts folder in the installation directory
and add it to the class path in settings
Rerun in PDF mode ... it will work
I faced similar issue with Arabic text and found above solution helps but it leads to another issues like JVM doesn't have Arial etc. And also we need to configure these properties on each and every field. Following configuration worked for me with the jasper latest versions.
Use DejaVu Sans font(I used DejaVu Sans Mono)
Add jasperreports-fonts dependency(In my case Jasper report version is 6.4.0 & jasper-fonts version is 6.0.0)
If you need right to left layout use mirroring trick mentioned in
iReport - How to change report direction to RTL?
Finally found this !!!
I'm using Jasper 6.17.0
Step 1: Download Arial font from website.
Step 2: Place this ttf file in the server path. eg. /app/jasper/Templates/TemplateFonts/
Step 3: Select text field/static field from the Jasper Design screen, In the Properties > Advanced > PDF provide below
PDF Embedded : true
PDF Encoding : Identity-H (Unicode with horizontal writing)
PDF Font Name : /app/jasper/Templates/TemplateFonts/arial.ttf
Try now :)
I know how to use custom fonts to display CCLabels. I also figured out how to localize the Labels. But I am wondering if there is anyway to display the localized text using custom fonts.
For example when I use Arial I have no problems, the chinese fonts appear correctly. But when I use a font not included in XCode such as ARLRDBD.TTF then the chinese characters do not get displayed.
How can I display the chinese characters in ARLRDBD.TTF too? Or am I stuck with just using the default fonts included in XCode if I plan to use LocalizedString?
Thanks
Abhinav
You should be able to use any font that has Chinese characters in it.
Not all fonts include characters for all languages. Many Western fonts only have the Roman alphabet (A-Z).
You could either use a font that has all the characters you will need (like Arial, or another Unicode font - see: http://en.wikipedia.org/wiki/Unicode_typeface), or have separate fonts for each language.
I'd suggest a different font for each language.
You could keep it organized with a simple struct.
typedef struct {
NSString *regionname;
NSString *fontname;
} RegionFont;
//later in the code....
RegionFont some_region;
some_region.regionname = #"China";
some_region.fontname = #"Arial";
You can test if a font supports a given language by opening Font Book (standard Mac app) and searching under "All Fonts" for the language you want.
I don't have many custom fonts installed and several with Chinese support come up.
Hope this helps.
You can use custom fonts in your app but you need to make the system aware that they exist using the UIAppFonts key in your Info.plist file. See here for more information.