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 Johannes Becker <Jo...@gmx.net> on 2006/08/08 13:00:00 UTC

Generate a PDF in memory with 0.20.5

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)?

Cheers
Jonny
-- 


"Feel free" – 10 GB Mailbox, 100 FreeSMS/Monat ...
Jetzt GMX TopMail testen: http://www.gmx.net/de/go/topmail

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


Re: Generate a PDF in memory with 0.20.5

Posted by Manuel Mall <ma...@apache.org>.
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: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org