Hi Sylvain, Thanks for answering.
I noticed 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 2015-01-20 14:08 GMT-02:00 Sylvain Cuaz <sylv...@ilm-informatique.fr>: > Le 13/01/2015 14:37, Fagner Sá de Souza a écrit : > >> I'm using JavaScriptFileTemplate to fill some fields in documents >> setField. >> >> It is possible to put a new line in a field? >> > > By default newlines are ignored, you should edit the field in > LibreOffice and prefix it with "%enc:" see org.jopendocument.dom. > template.engine.Processor > > Cheers, > Sylvain > > > -- > > --- 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. > -- --- 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.