Hi,
I have a question regarding to UTF-8 characters when creating a PDF
document:
I have the initial content in byte[] myBytes, and myBytes contains some
Japanese characters. Yet, once I render it, each Japanese character is
displayed as a pound sign (#).
Is this a known bug, or am I missing something?
Thank you in advance.
Regards,
Melih
Here is my code:
==================
InputSource is = new InputSource(new java.io.ByteArrayInputStream(myBytes));
is.setEncoding("UTF-8");
ByteArrayOutputStream out = new ByteArrayOutputStream();
try {
Driver driver = new Driver();
driver.setInputSource(is);
driver.setOutputStream(out);
driver.setRenderer(Driver.RENDER_PDF);
// transform XSL:FO to PDF
driver.run();
} catch (Exception ex) {
}
byte[] content = out.toByteArray();
java.io.FileOutputStream fos = new java.io.FileOutputStream("c:\\out.pdf");
for (int i=0 ; i<content.length ; i++) {
fos.write(content[i]);
}
fos.close();
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]