I am trying to generate pdf report from .jasper file into my web based java application with struts framework. But the font dispalyed during the pdf Report is not displayed properly( Here is the print Screen ) while at the time of preview it works properly or we can export the same report in other formats like docx, html it works properly( Here is the print screen )
Not sure, but have you tried setting isPdfEmbedded=true so that the font is included with your PDF file?
example:
<font fontName="Mangal" size="12" isBold="true" isItalic="false" isUnderline="false" isStrikeThrough="false" pdfFontName="C:\\Windows\\Fonts\\Mangal.TTF" pdfEncoding="Identity-H" isPdfEmbedded="true"/>
jasperreports-fonts-with-Mangal.jar\\net\\sf\\jasperreports\\fonts\\dejavu
net/sf/jasperreports/fonts/dejavu/mangal.ttf net/sf/jasperreports/fonts/dejavu/mangalb.ttf Identity-H true
4.) In jasper reports select font mangal in the above font bar.
:) Enjoy.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.