2002 JI Open Discussion Posted August 30, 2006 Share Posted August 30, 2006 By: smitha - smitha_anju Problem Displaying Arabic font in pdf 2005-03-02 22:12 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. JRBeanArrayDataSource rptDS = (JRBeanArrayDataSource)session.getValue("BEAN_DATASOURCE"); 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.getPath(),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(); There is no problem when export is done to excel or html. Can any one help me in this matter. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now