if (hints.containsKey(KEY_STROKE_TEXT)) {
stroke = ((Boolean)hints.get(KEY_STROKE_TEXT)).booleanValue();
}
// 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();