Hi Rafael, I solved this.
I realize that the generated files, images are embedded directly in the xml in an array of bytes64. What I did was take a picture, go to bytes64 and incorporate in the position where the previous was, seems to have worked. Below my code: . . . ODSingleXMLDocument doc = template.createDocument(); String fig = "/home/fagner-souza/Imagens/tela.png"; FileInputStream fis = new FileInputStream(new File(fig)); byte[] bytes = IOUtils.toByteArray(fis); String base64 = Base64.encodeBytes(bytes); Element elemento = (Element) doc.getDescendantByName("draw:frame", "figuraf1").getChildren().get(0); elemento.addContent(new Element("binary-data", Namespace.getNamespace("office", "urn:oasis:names:tc:opendocument:xmlns:office:1.0")).setText(base64)); . . . thanks, -- Fagner Souza http://twitter.com/Fagner_Souza http://www.facebook.com/fagnersouza Em terça-feira, 4 de novembro de 2014 10:45:05 UTC-2, Rafael Ruiz escreveu: > > I can not find how to insert an image from a byte array. I would like to > replace a text string in the previous image from the array of bytes. Thank > you very much for your suggestions > -- --- You received this message because you are subscribed to the Google Groups "jOpenDocument" group. To unsubscribe from this group and stop receiving emails from it, send an email to jopendocument+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.