【解决办法】1、首先获取到符号并将其导出为svg:SymbolMarker marker = (SymbolMarker) markerLibrary.getRootGroup().get(10);
marker.toSVG("F:\干货\JavaCHM\test1.svg");
2、将svg导出为png:
public void convertSvg2Png(File svg, File png) throws IOException, TranscoderException
{
InputStream in = new FileInputStream(svg);
OutputStream out = new FileOutputStream(png);
out = new BufferedOutputStream(out);
Transcoder transcoder = new PNGTranscoder();
TranscoderInput input = new TranscoderInput(in);
TranscoderOutput output = new TranscoderOutput(out);
transcoder.transcode(input, output);
}