Am 25.07.2013 12:07, schrieb Christophe Fillot: > Hello, > > I would like to add images in a TextDocument, but I've these images as > byte arrays. > Unfortunately the TextDocument.newImage() method only supports URI. Is > there > another way to do that ? > > Thanks in advance, > > Christophe > Out of curiosity, why are you want to add an image without URL? In ODF XML an image needs to have an URL (ie. href attribute in the draw:image element) to be valid.
See http://docs.oasis-open.org/office/v1.2/os/OpenDocument-v1.2-os-schema.rng (440k) <define name="draw-image"> <element name="draw:image"> <ref name="draw-image-attlist"/> <choice> <ref name="common-draw-data-attlist"/> <ref name="office-binary-data"/> </choice> <ref name="draw-text"/> </element> </define> <define name="common-draw-data-attlist"> <group> <attribute name="xlink:type"> <value>simple</value> </attribute> <attribute name="xlink:href"> <ref name="anyIRI"/> </attribute> <optional> <attribute name="xlink:show"> <value>embed</value> </attribute> </optional> <optional> <attribute name="xlink:actuate"> <value>onLoad</value> </attribute> </optional> </group> </define>
