Add PDF font to JasperReport export - pdf

I am using iReport to create a series of reports. In iReport my default font is set to "SansSerif"; on my machine (Ubuntu Linux) this is actually DejaVu Sans. Ultimately the reports need to be rendered as PDF files. When a PDF is generated the text font is actually Helvetica and is causing formatting issues. Ideally the font in iReport would be the same as the PDF font. That is where my issue resides.
I have tried changing the net.sf.jasperreports.default.pdf.font.name setting to 'DejaVu Sans' but that throws an error about the font not being found. From what I understand it is actually iText creating the PDF. Is that correct? In the iText jar Helvetica is embedded in the jar. Does the same thing need to be done to the other fonts? How does one go about that?
I have researched this and tried all kinds of things. Any ideas would be appreciated.

To install missing fonts in iReport, Access the following sub-items from the menu bar
Tools > Options >Fonts > Install Font
Add fonts files e.g garamond.otf,
Add font family details
Select locale of your country
Manage font mapping to avoid the missing font property in OS
After adding all required fonts click on Export as extension to save the jar extension
Add this Jasperreport-font.x.x.x.jar on your project library or classpath

Related

SSRS Check printing using MICR font

I need to create AP check for the invoices. I am using the MICR font at the bottom of a check in the SSRS report. I used the text box size as big as 3 times the font size. When I preview the report, the text shows just like Arial font. When I export to PDF and open the document properties of that PDF file, it shows that MICR font exists. But it is not showing like that MICR font that used in check routing/accounting number.
It does not work for in report viewer, exported PDF or word files.
Could anyone please guide me how to show that font in the text box?
Is it a TrueType font? Microsoft has openly stated that if you're using anything other than TrueType e.g. OpenType that you're likely to run into issues with SSRS and the Report Builder. OpenType is not unsupported but has limited support at best.
If a TrueType font is available for MICR, ensure it is installed on your client and server machines. When you install the font on your server, you will need to restart the Reporting Services service, or preferably the server, to detect changes. I found this article exceedingly helpful when setting up custom fonts for SSRS: Setting up Custom Fonts with SQL Server Reporting Services.
The reason why you're seeing a font similar to Arial in your report is because of a limitation with Windows Forms Applications.
The root cause is that Windows Forms applications support TrueType fonts and have limited support for OpenType fonts. If we attempt to use a font that is not supported in Report Builder or SQL Server Data Tool (SSDT) to design a report, the Microsoft Sans Serif font will be substituted.
Found at this source.

Pentaho Report Designer PDF export is not showing the Japanese characters

I have created a report using Pentaho Report Designer 3.9.1 and it contains Japanese characters. When I try to export the report into PDF, I am not getting the Japanese characters in PDF. Instead of Japanese characters it's showing as empty in PDF.
When I try to export into Excel, Japanese characters are displaying.
It is known that built-in fonts of the JDK are mapped to built-in fonts ( SANS-SERIF, SERIF OR ANY OTHER BUILT-IN FONT) of the PDF standard and that these fonts do not support anything other than western-european languages.
These fonts are not defined to include any Japanese characters as Japanese is not a western european language. If you use a font that does not include Japanese characters, you cannot expect it to display these characters.
Configuration that is needed is in PRD.
Click on File | Configuration
Click on 'output-pageable-pdf'
Set '~.EmbededFonts' to True
Set '~.Encoding' to UTF-8
The reason behing the japanese font working with PDF because, if you are using a metadata as the datasource, the metadata fonts for that field will be having a default font set one say example "Arial-10". You will have to edit the font there or you will have to manually override it in the report designer by setting the "data-format and the style-format" to false.
To get the result in BAServer:
Stop BA Server.
Browse to this file:
\biserver-ee\tomcat\webapps\pentaho\WEB-INF\classes\classic-engine.properties
Change the following properties.
org.pentaho.reporting.engine.classic.core.modules.output.pageable.pdf.Encoding=UTF-8
org.pentaho.reporting.engine.classic.core.modules.output.pageable.pdf.EmbedFont‌​s=true
Start the server.
Update : As per Rajasekaran M, he had to use the font SimHei in PRD and add simhei.ttf to fonts, inorder to work it in both PRD and BIServer.
For who have the utf-8 issue with BI server on Linux, you may need to add font for machine. Below is what I done to resolve:
copy fonts to usr/share/font/your-fonts (not work if copy to /home/your-user/.fonts)
add font command:
$ fc-cache -fv
To list all font:
$ fc-list

Remove font using iText

I have a problem with my PDFs. They have a default font, Helvetica. This font is unused, but I need to develop a script that automatically deletes this font.
After asking two questions:
Unset PDF font with script
xhtml2pdf doesn't embed Helvetica
I finally discover iText. I've been trying to work with this library, and I made a few successful tests with Unembeding Fonts (example). But I can't find anything about deleting a whole font from de PDF.
Thanks a lot

PDF – A font displays correctly even it is not installed in PC?

Is PDF store the font in binary, or which logic working behind that?
Because, I create PDF from jasper report and used font is installed in my PC only.
When i have checked generated PDF in other machine then it show the correct PDF font
even font not installed in other PC.
Let me know if anything is missing test or verify?
Fonts can be embedded in PDF files. If one font is missing, the text is displayed anyway using another classic font. You can have a great explanation here : http://www.prepressure.com/pdf/basics/fonts

TTF webfont to desktop-useable TTF

I'm using a CC-BY FontAwesome typeface for icons on my Twitter Bootstrap-driven website. Now I want to use it in an image editor for a prototype of another website. But it does not work. I cannot use its webfont-TTF with my image editing application. How can I convert it to a normal font?
Please dont give me links to free-/shareware closed-source utilites. I want to know, why does this happening and implement my own script which would "fix" this font.
FontAwesome should work out of the box. Heres how to use it:
Download FontAwesome. Then open fonts/FontAwesome.otf and install it (either with fontbook on osx or by adding it to your fonts folder on windows).
Use the Cheatsheet to actually use specific icons. Find the icon you want there, select the icon and copy it.
Switch to your image editor, create a text item, set the font to FontAwesome, and paste the symbol you copied.
I assume you are talking about http://fontawesome.io/ .
If so there is nothing wrong with the TTF version of this font and no reason to convert it. I have tested the font on linux by dropping the .ttf file in /usr/share/fonts/ and it is useable in LibreOffice, Gimp and Terminal.
You problem is almost certainly one of:
The process you used to install the font
You aren't entering the correct Unicode characters or your image editor doesn't support Unicode.
However you failed to provide enough details. You haven't even defined what you mean by "it does not work". Please update your question with details like the process you used, a link to the actual font you downloaded and the operating system and image editor you're using.
In case you're still looking for a solution: the easy way is to convert the included SVG font to usable TrueType or OpenType, using e.g. FontForge or an online service.
AFAIK SVG fonts have no DRM flags, unlike TrueType.