I am using Fop-0.20.2

Is it generally possible to output a pdf stream via a java.io.Writer object

I know its better to use OutputStreams objects to output binary streams as
pdf,but i want to use a JSPWriter(in a TagLibrary Class) to output a Pdf
Stream so that i can use it as embedded pdf.

The following sourcode should do the the job

InputSource foInputSource = getInputSource();
//buffer fo outputStream
ByteArrayOutputStream foBufferStream = new ByteArrayOutputStream();
Driver driver = new Driver(foInputSource,foBufferStream);
//perform the fo rendering process

String foOutString = new String(foBufferStream.toByteArray());
//the writer reference is as reference to the JSPWriter which was passed as

The problem is that when i convert a ByteArrayOutputStream to a String ,
some characters are converted wrong.

For Example , the HEX 8d will be converted to HEX 3f , how can i avoid this
? What encoding do i have to use to avoid this ?

Thank you in advance,


GMX - Die Kommunikationsplattform im Internet.

To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]

Reply via email to