> How to generate image on pdf from  binary stream ?
> I want to display logo image in pdf file, but I only have the binary stream 
> of the gif file
> retrieved from database, and I don't want to create the gif file. Can anyone 
> tell me how to 
> generate image on pdf file  from binary stream.

If I get you right, you want to load the GIF from the database instead
of from a file. Images are getting loaded by FOP using URLs.
Ok, then you have to create a new protocol handler so you can fetch the
image using an URL such as myimages://mydb/id76723644, for example,
where myimages is your custom protocol, mydb your database and
id76723644 the id of the images in the database. Your protocol handler
will then establish a connection to the database lookup the id of the
image and return the InputStream on the blob in openStream().

There's a good tutorial on how to create such protocol handlers:

Good luck!

Jeremias Märki


Postfach 3954 - Rhynauerstr. 15 - CH-6002 Luzern
Tel. +41 41 317 2020 - Fax +41 41 317 2029
Internet http://www.outline.ch

Reply via email to