Thank you for your helps!
Using org.apache.batik.transcoder.* , I can convert a svg file to a png file
To be honest , I don't know how to use the designer's js api into my application. It's difficult.
Is there any other java code can achieve it(bpmn-->svg)
If anyone knows,looking forward to your helps!