UserAgent ua = createBatikUserAgent(pxToMillimeter);
GVTBuilder builder = new GVTBuilder();
final ImageManager imageManager = (ImageManager)hints.get(
ImageProcessingHints.IMAGE_MANAGER);
final ImageSessionContext sessionContext = (ImageSessionContext)hints.get(
ImageProcessingHints.IMAGE_SESSION_CONTEXT);
boolean useEnhancedBridgeContext = (imageManager != null && sessionContext != null);
final BridgeContext ctx = (useEnhancedBridgeContext
? new GenericFOPBridgeContext(ua, null, imageManager, sessionContext)