You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-users@xmlgraphics.apache.org by Victor Mote <vi...@outfitr.com> on 2003/04/23 21:11:27 UTC

RE: How To Direct FOP Output To A String That Can Be Written To A File?

Gary Fix wrote:

> How do I direct FOP output to a string that can be written to a file?

Why do you want to do this? Is this what you really want:
http://xml.apache.org/fop/embedding.html ?

Victor Mote

---------------------------------------------------------------------
To unsubscribe, e-mail: fop-user-unsubscribe@xml.apache.org
For additional commands, e-mail: fop-user-help@xml.apache.org


Re: How To Direct FOP Output To A String That Can Be Written To A File?

Posted by Jeremias Maerki <de...@greenmail.ch>.
That won't work. PDF is a binary format. You have to use a byte[] if you
absolutely want to keep the whole PDF in memory.

Use:
return out.toByteArray();

On 23.04.2003 21:37:22 Gary Fix wrote:
> Hi Victor,
> Yes, I really do want to output to a String...
> My goal is to return the PDF String to a calling class or application
> instead of directing the PDF straight to a File...
> 
> I have another method that directs the PDF output straight to a File and it
> works great...
> But when I try to return a PDF String, then write this to a file (or to the
> console and paste it to a file) for testing, I get a blank page...


Jeremias Maerki


---------------------------------------------------------------------
To unsubscribe, e-mail: fop-user-unsubscribe@xml.apache.org
For additional commands, e-mail: fop-user-help@xml.apache.org