final float deviceResolution = userAgent.getTargetResolution();
log.debug("Generating SVG at " + deviceResolution + "dpi.");
log.debug("Generating SVG at " + deviceResolution + "dpi.");
final float uaResolution = userAgent.getSourceResolution();
SVGUserAgent ua = new SVGUserAgent(25.4f / uaResolution, new AffineTransform());
//Scale for higher resolution on-the-fly images from Batik
double s = uaResolution / deviceResolution;
AffineTransform resolutionScaling = new AffineTransform();
resolutionScaling.scale(s, s);