File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Other JSE/JEE APIs and the fly likes Crystal Reports XI R2 Chinese Display on PDF export Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Other JSE/JEE APIs
Bookmark "Crystal Reports XI R2 Chinese Display on PDF export" Watch "Crystal Reports XI R2 Chinese Display on PDF export" New topic
Author

Crystal Reports XI R2 Chinese Display on PDF export

Eugene Wong
Greenhorn

Joined: Mar 05, 2007
Posts: 11
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();
reportClientDoc.open(incomingRPT, 0);
reportClientDoc.getDatabaseController().setDataSource(rs, func, "resultTbl");
ByteArrayInputStream byteArrayInputStream = (ByteArrayInputStream)reportClientDoc.getPrintOutputController().export(ReportExportFormat.PDF);
reportClientDoc.close();
byte byteArray[] = new byte[byteArrayInputStream.available()];
File file = new File(outgoingPDF);
FileOutputStream fileOutputStream = new FileOutputStream(file);
ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream(byteArrayInputStream.available());
int x = byteArrayInputStream.read(byteArray, 0, byteArrayInputStream.available());
byteArrayOutputStream.write(byteArray, 0, x);
byteArrayOutputStream.writeTo(fileOutputStream);
byteArrayInputStream.close();
byteArrayOutputStream.close();
fileOutputStream.close();
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Crystal Reports XI R2 Chinese Display on PDF export
 
Similar Threads
jpg into ByteArray
[Crystal Reports] JRCAgent1 received a request that cannot be handled by the JRC
PDF in new Browser window
Trouble with ODBC CSV connection when export Crystal RPT to PDF
Serialization Problem