ARABIC FONT NOT DISPLAYED WHILE EXPORTING TO PDF
Hi
I am using the following code to export my jasper reports to PDF
the code is working fine if the report has only english or alphanumeric data. In my case I have some English and arabic texts mingled together. In this case while exported to pdf the english fonts are displayed properly but the arabic fonts are overlapped and some times not displayed.Can any one help me in this matter.
JRBeanArrayDataSource rptDS = (JRBeanArrayDataSource)session.getValue("BEAN_DATA SOURCE");
rptDS.moveFirst();
String reportrealPath = (session.getValue("JASPER_NAME")).toString();
Map parameters = (HashMap)session.getValue("PARAM_MAP");
File reportFile = new File(application.getRealPath(reportrealPath));
byte[] bytes =JasperRunManager.runReportToPdf(reportFile.getPat h(),parameters,rptDS);
response.setContentType("application/pdf");
response.setContentLength(bytes.length);
response.setHeader("content-disposition", "attachment;filename=report.pdf");
ServletOutputStream ouputStream = response.getOutputStream();
ouputStream.write(bytes, 0, bytes.length);
ouputStream.flush();
ouputStream.close();
Regards
Pratap
|