/** * Returns the renderer configuration object for a particular MIME type. * * @param mimeType the config MIME type * @param configCreator the parser for creating the config for the first run of parsing. * @return the renderer configuration object * @throws FOPException if an error occurs when creating the config object */ public RendererConfig getRendererConfig(String mimeType, RendererConfigParser configCreator) throws FOPException { return factory.getRendererConfig(this, getRendererConfiguration(mimeType), configCreator); }
/** * Configures renderer context by setting the handler configuration on it. * @param context the RendererContext (contains the user agent) * @param ns the Namespace of the foreign object * @throws FOPException if configuring the target objects fails */ public void configure(RendererContext context, String ns) throws FOPException { //Optional XML handler configuration Configuration cfg = userAgent.getRendererConfiguration(context.getRenderer().getMimeType()); if (cfg != null) { cfg = getHandlerConfig(cfg, ns); if (cfg != null) { context.setProperty(RendererContextConstants.HANDLER_CONFIGURATION, cfg); } } } }