I'm using JOpenDocument 1.3 to create odt files from a template. This works
great but I can't find any great way to add an image to it. At the moment I
use the following code to put them in the document but the images are not
embedded into the file.
private ODSingleXMLDocument putImageInDocument(ODSingleXMLDocument document,
File image) {
Namespace namespace = Namespace.getNamespace("xlink",
"http://www.w3.org/1999/xlink");
document.getDescendantByName("draw:frame", "Image").setAttribute("href"
, image.getAbsolutePath(), namespace);
return document;
}
If anybody knows how to embed the image or use the JavaScriptFileTemplate
class, please let me know.
If these are available in newer versions, I can upgrade to them.
Greetings
Ben Maes
--
---
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 [email protected].
For more options, visit https://groups.google.com/d/optout.