[英]How do we get proper display of Hindi Unicode font on PDF Export Report from jasper Report
I am trying to generate pdf report from .jasper file into my web based java application with struts framework. 我正在尝试使用struts框架将.jasper文件中的pdf报告生成到基于Web的Java应用程序中。 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 )
但是在pdf报告中显示的字体无法正确显示( 这是打印屏幕 ),而在预览时它可以正常工作,或者我们可以将其他格式的文档导出为docx,html等它也可以正常工作( 这是打印屏幕 )
Not sure, but have you tried setting isPdfEmbedded=true so that the font is included with your PDF file? 不确定,但是您是否尝试设置isPdfEmbedded = true以便将字体包含在PDF文件中?
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
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
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. 4.)在jasper报告中,在上方字体栏中选择字体mangal。
:) Enjoy. :) 请享用。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.