Jasper Reports: I don't see specific letter of Croatian alphabet [duplicate] - jasper-reports

This question already has answers here:
Jasper Reports PDF doesn't export cyrillic values
(1 answer)
How can I test if my font is rendered correctly in pdf?
(1 answer)
Closed 11 months ago.
I am having a trouble with jasper reports. The task is to update the font used on some reports from dejavu sans (used earlier to get all the Croatia diacritic letters - č, ć, đ, š, ž) to times new roman. The jaspersoft studio version application uses is 6.9.0.
The existing times new roman does not do what I want to, it does not show Croatian letters at all, so I created a "new" times new roman font (tried it with multiple encodings and preferences when adding a new font). It works OK besides the issue with đ letter. Did anybode here had similar problems? It would not be a problem for non-variable texts where đ can be changed with dj, but if the content that needs to be formated to times new roman comes from the database, I have to show it the way it is in there.
When I say that I don't see the specific letter - I don't see it in PDF when the report is published.
Thank you for your time.

Related

Hindi content in Java and jasper report [duplicate]

This question already has answers here:
How can I render hindi correctly when exporting to pdf?
(4 answers)
Closed 7 months ago.
**
How to get Hindi content stored in informix database in JAVA code?
How to display Hindi content in Jasper ireport? Stored content in
database is showing as ??????????????????????????????????????'
My code is :
String sql="";
sql="select template from ropk_sms where template_id=1307165174435759958";
List<Map> getRecords = jdbcTemplateObject.queryForList(sql);
for (Map row : getRecords){
Sirkdpe0100ActionBean objBean = new Sirkdpe0100ActionBean();
Collection c = row.values();
Iterator itr = c.iterator();
obj = itr.next();
objBean.setParty_name(obj!= null ?obj.toString().trim():"");
System.out.println("DATA"+objBean.getParty_name());
allRecords.add(objBean);
}
**
Hindi content should just be a string of characters, like other content in languages.
The fact that your content shows as question marks is likely that you are using the wrong encoding or the font used to display the characters just does not support Hindi characters.
Just make sure all your systems use Unicode and the same encoding type (e.g. UTF-8).
To have your database work correctly when sorting results, set the collation to Hindi as well (though I do not know how it is done on Informix).
Finally ensure the fonts used for rendering contain glyphs for your characters.

how to generate a pdf with pdfbox which should contains latin/asian/arbian charaters in the same page?

I try since few days to produce a new pdf file with pdfbox from a data extraction which contains values with different fonts. I have mainly latin characters but some names in my list of strings are in chinese or cyrillic, etc, characters.
I have spent lots of time and energy on google or stackoverflow but still don t manage to produce it(glyphe issue).
Currently, I m on Windows but will be deployed on Linux, and I use the version 2.0.26 or 3.0.0-RC1 of pdfbox.
I m manage to load ttf like that:
PDType0Font.load(doc, File("src/main/resources/font/LiberationSans-Regular.ttf").inputStream(),false)
if I set true to embedded in any cases, I got an issue of cmap.
I also tried to load ttc files but failed each time.
I have already started to implement this solution link but I don t manage to init/load correctly my font
Do you have any idea to do it?
Best, Mat

How adding automatic Dollar symbol in JasperStudio [duplicate]

This question already has answers here:
formatting a string to a currency format in jasper report
(8 answers)
Closed 6 years ago.
How can I add Dollar symbol in Textfield automatic in JasperStudio Soft?
I have one Report show price, and I Want jasper studio to add an automatic $ symbol.
Usually you would use textfield patterns for displaying currencies:
There are already some predefined patterns in Jaspersoft Studio, which you could use:
And this is how it would look like in the source code:
<textField pattern="¤#,##0.##;¤-#,##0.##">
An alternative (but also very ugly) way would be to just add the Dollar symbol in the expression:
<textFieldExpression><![CDATA["I am a value"+"$"]]></textFieldExpression>

Hindi Fonts in JasperReports [duplicate]

This question already has answers here:
How can I render hindi correctly when exporting to pdf?
(4 answers)
Closed 4 years ago.
In Internal preview of Hindi fonts Displays Correctly. But in Pdf It Varies .
For Example : पिता . In Pdf it Shows प िता
How to resolve this.
Special characters like Hindi language symbols will be supported by few font types like Arial Unicode MS:
To Resolve this issue, Open Ireport designer and apply below properties to the report:
Font Name = "Arial Unicode MS".
PDF font name = This property is deprecated, so leave it blank.
PDF Encoding = 'Identity-H (Unicode with horizontal writing)'.
Hope this help you resolve the issue.
Regards,
Srikanth Kattam

How to convert a normal font face to Unicode font [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 9 years ago.
Improve this question
I want to know , how can we convert a font to Unicode font. I have PDF file in my native language but those text has been written in a specific font file (ttf file). So i want to convert those text into Unicode fonts.
So how can i convert those text into Unicode. Is there any free online software available or i have to write any software code in any language.
I have tried in PHP but not getting much more effective.
Your question mixes several basic concepts (it is unclear whether you want to convert a font or the text it's written with), and I suggest you look a bit deeper into font technology before asking "then so how would I do it".
"Normal" fonts are using Unicode encoding. The "encoding" of a font describes which character image inside a font gets output for a given character code. A font can contain several encodings -- MacRoman, Windows Western -- and nowadays including a Unicode encoding is practically standard.
A font that does not comply to Unicode encoding (or any of the common ones) cannot be used without a translation from its character set to Unicode.
Your description suggests that the font in your PDF may be such a non-conforming font, so you need a table that maps its character codes to Unicode values. Use Google to see if someone else did this before you; if not, you will have to create the table yourself.
However.
Since your text comes out of a PDF, you cannot rely anymore on the encoding! If a PDF gets created, the software that does it is free to move characters around to different positions -- usually it creates a subset font from the original, and it can be convenient to reassign character codes. Friendly PDF creators may also include their own encoding in the PDF, but it is not mandatory. If it is missing, and your font is subsetted, then there is only one solution: you will have to create a translation table for that particular PDF. It will not be of any use for other documents using "the same" font, because that most likely will have a different subset.