Hi, Thomas i find an other method to do a clipping
it's simple, it's to manipulate the RootElement and change the element width,
height, viewbox
but if i find the method and code this, i have a problem it's that i cant arrive
to change the value of the svgFile
.../...
//METHODE DE CLIPPING
String svgURS = new File(rep+Sortie).toURL().toString();
System.out.println("svgURS = "+ svgURS);
UserAgent userAgent1 = new UserAgentAdapter();
DocumentLoader docload1 = new DocumentLoader(userAgent1);
Document doc1 = docload1.loadDocument(svgURS);
//petit probleme au niveau de l element ou du document
//je ne recupere pas les titres du svg
Element elt1 = doc1.getDocumentElement();
boolean res1 = elt1.hasAttributeNS(null, "width");
System.out.println("res1 = "+res1);
String res = elt1.getAttributeNS(null, "width");
System.out.println("width = " + res);
elt1.removeAttributeNS(null, "width");
//elt1.removeAttributeNS(null, "viewBox");
//elt1.setAttributeNS(null, "width", "250");
res = elt1.getAttributeNS(null, "width");
System.out.println("width = " + res);
elt1.setAttributeNS(null, "viewBox", "100 100 100 100");
thanks
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]