// build the GVT tree
GVTBuilder builder = new GVTBuilder();
ImageRendererFactory rendFactory = new StaticRendererFactory();
GraphicsNodeRenderContext rc = getRenderContext(stroke);
BridgeContext ctx = new BridgeContext(userAgent, rc);
PDFAElementBridge pdfAElementBridge = new PDFAElementBridge();
ctx.putBridge(pdfAElementBridge);
GraphicsNode gvtRoot;
try {
gvtRoot = builder.build(ctx, svgDoc);
} catch (BridgeException ex) {
throw new TranscoderException(ex);
}
// get the 'width' and 'height' attributes of the SVG document
float docWidth = (float)ctx.getDocumentSize().getWidth();
float docHeight = (float)ctx.getDocumentSize().getHeight();
ctx = null;
builder = null;
// compute the image's width and height according the hints
float imgWidth = -1;