Win a copy of Kotlin in Action this week in the Kotlin 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);
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!