Ok. Thanks it works now.
I have another question now.
If i have a list in the xml file. For example a list of bundles. And every
bundle should be in a new page.
How can i do that? They should be created dynamically.


-----Original Message-----
From: Oleg Tkachenko [mailto:[EMAIL PROTECTED]
Sent: Thursday, February 20, 2003 11:07 AM
To: [EMAIL PROTECTED]
Subject: Re: empty pdf file


Rabih Yassine wrote:

>             InputSource in = new InputSource(file);
>             ByteArrayOutputStream out = new ByteArrayOutputStream();
>             Driver driver = new Driver(in, out);
>             driver.setLogger(log);
>             driver.setRenderer(Driver.RENDER_PDF);
>             driver.run();
>             byte[] content = out.toByteArray();
>
>             FileWriter f = new FileWriter("D:/kokeet4.pdf");
>             f.write(new String(content));
>             f.flush();

Probably FileWriter spoils binary pdf content, use OutputStream instead, see
FopServlet example in contrib/servlet/src directory.

--
Oleg Tkachenko
Multiconn Technologies, Israel


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


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

Reply via email to