Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Crystal Reports XI R2 Chinese Display on PDF export  RSS feed

Eugene Wong
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Dear all,

I am running JRC as a java desktop application, instead of web. There is a problem which the Chinese cannot be displayed correctly when exporting to pdf. Here is the code, any help would be great, thanks.

String incomingRPT = "incoming.rpt";
String outgoingPDF = "outgoing.pdf";
ReportClientDocument reportClientDoc = new ReportClientDocument();, 0);
reportClientDoc.getDatabaseController().setDataSource(rs, func, "resultTbl");
ByteArrayInputStream byteArrayInputStream = (ByteArrayInputStream)reportClientDoc.getPrintOutputController().export(ReportExportFormat.PDF);
byte byteArray[] = new byte[byteArrayInputStream.available()];
File file = new File(outgoingPDF);
FileOutputStream fileOutputStream = new FileOutputStream(file);
ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream(byteArrayInputStream.available());
int x =, 0, byteArrayInputStream.available());
byteArrayOutputStream.write(byteArray, 0, x);
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!