Hi Robert,

Robert Vojta schrieb:
Hallo all,

I have images in database and they are stored in my Java application
as byte arrays. Is there a way how to insert these images directly
into Writer's document? I can temporarily save them on hard drive,
insert via url and then remove them. But I would like to avoid
temporary saving of images. Is there a way how to do this or have I
stick with temporary saving solution?


if you have the image as an InputStream, than you can query the GraphicProvider Service for the stream property.

Found the following Basic snippet on the dba dev mailinglist:

oProvider = createUnoService("com.sun.star.graphic.GraphicProvider")
Dim oProps(0) as new com.sun.star.beans.PropertyValue
oProps(0).Name  = "InputStream"
oProps(0).Value =  oStream

oShape.Graphic = oProvider.queryGraphic(oProps())


Regards

Peter


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

Reply via email to