On Tuesday 08 August 2006 19:00, Johannes Becker wrote:
> Hi,
>
> I want to generate a PDF in memory (never written to
> disk) and send it right away as an email-attachment.
>
> My problem is that I haven't found a clue in the API how to generate
> a pdf in memory.
>
> Is this posiible with 0.20.5? If possible: How (code snippets
> appreciated)?
>
See http://xmlgraphics.apache.org/fop/0.20.5/embedding.html.

In particular in the Basics section it says: The simplest way to use 
Driver is to instantiate it with the InputSource and OutputStream, then 
set the renderer desired and call the run method.

Just use a ByteArrayOutputStream and you got your pdf in memory.

There is a more complex example using a ByteArrayOutputStream in 
http://xmlgraphics.apache.org/fop/0.20.5/servlets.html.

> Cheers
> Jonny

Manuel

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

Reply via email to