Jump to content
We've recently updated our Privacy Statement, available here ×

Problem Displaying Arabic font in pdf


Recommended Posts

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

  • Replies 0
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

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 account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...