Hi Guido,
Guido K�mper wrote:
TD> I would just use the image element to put the two
TD> documents side by side is there a reason this won't work?
I'm sorry... As I wrote before, i'm not very experienced with
SVGs and especially with Batik. This was the first way I
tested to merge the images. What do you mean with "image element"?
Is there an easier way to put the documents side by side? Do you
have some sample lines of code? This would help a lot:-)
From the top of my head, this is all pretty standard
SVG/DOM (you might pick up a good SVG book - SVG Unleashed
is commonly reccomended, it will focus on javascript but
most of the stuff maps pretty directly back to Java,
thanks to DOM).
String svgns = "http://www.w3.org/2000/svg";
String xlinkns = "http://www.w3.org/XML/1998/namespace";
Element root = document.getRootElement();
Element img1 = document.createElementNS(svgns, "image");
img1.setAttribute("x", "0");
img1.setAttribute("y", "0");
img1.setAttribute("width", "300");
img1.setAttribute("height", "400");
img1.setAttributeNS(xlinkns, "xlink:href", <URL to document 1>);
root.appendChild(img1);
Element img2 = document.createElementNS(svgns, "image");
img2.setAttribute("x", "300");
img2.setAttribute("y", "0");
img2.setAttribute("width", "300");
img2.setAttribute("height", "400");
img2.setAttributeNS(xlinkns, "xlink:href", <URL to document 2>);
root.appendChild(img2);
svgResult.setSVGDocument(document);
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]