I am trying to show JasperReports report from web application which content some marathi (indian regional language) text.
When I run preview in iReport it looks perfect but when I try it from web application to view report as in pdf format then text not shown.
Here is what I try to do.
ServletContext context = getServletContext();
InputStream is = context.getResourceAsStream("report/name.jasper");
Map param = new HashMap();
param.put("para", "1");
byte[] bytes = JasperRunManager.runReportToPdf(is, param, con);
response.setContentType("application/pdf");
response.setContentLength(bytes.length);
ServletOutputStream outStream = response.getOutputStream();
outStream.write(bytes, 0, bytes.length);
outStream.flush();
outStream.close();
I also suggested that to add jasperreports.properties are as follows
net.sf.jasperreports.default.pdf.encoding=Cp1250
but when I use this property text shows like "?????"
This is the preview from iReport:
This is the preview when I shown report as pdf from my web application:
This is preview when I use net.sf.jasperreports.default.pdf.encoding=Cp1250