Have a look at this thread:
This may help you, too.
> From my application I get an inputstream containing a jpg-image. I don't
> want to store it as file. Is there a possiblity to use this stream with
> fop?(I have to convert it into a PDF-file on the fly)
> May be there are other constructs than <fo:external-graphic
> src="C:/testat.jpg"/> but I didn't found them.
Postfach 3954 - Rhynauerstr. 15 - CH-6002 Luzern
Tel. +41 41 317 2020 - Fax +41 41 317 2029