Hi Jean, jeanromain <[EMAIL PROTECTED]> wrote on 01/03/2007 01:58:23 PM:
> Does anybody know how can a program can load an SVG, modify it (based > on XML configuration file) and transform it in PNG file without using > any event ?? I don't know what you mean by event. But you can modify any SVG anyway you want to before giving it to the PNGTranscoder. > For info: > I do not want to deal with events as I neeed to generate many PNG (and > so to load many SVG). I made a program that works for ONE image but > with 2, 3, ..images . , it doesn't :( Care to say what happens (why it doesn't work) with 2, 3, ... images. > Here is a simplified piece of my code: It seems simplified beyond utility, especially w/o know what problem you are having with multiple images... > String parserClassName = XMLResourceDescriptor. > getXMLParserClassName(); > SAXSVGDocumentFactory f = new SAXSVGDocumentFactory(parserClassName); > try { > document = f.createDocument(new File(svgFullFilePath). > toURL().toString()); > > //ApplyConfig(); > > } catch(IOException e){ > Log.Write(e.toString()); > } > Element r = document.getElementById("SEL_POSITION__AIR_FLOW"); > r.setAttribute("value", "HI"); > > CreatePng(document); // This method works fine > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] >