public PDFRendererConfig build(FOUserAgent userAgent, Configuration cfg) throws FOPException { boolean strict = userAgent != null ? userAgent.validateUserConfigStrictly() : false; return new ParserHelper(cfg, userAgent, strict).pdfConfig; }
/** * Default constructor * @param userAgent user agent */ public PrintRendererConfigurator(FOUserAgent userAgent, RendererConfigParser rendererConfigParser) { this(userAgent, rendererConfigParser, new DefaultFontConfigurator(userAgent.getFontManager(), new FontEventAdapter( userAgent.getEventBroadcaster()), userAgent.validateUserConfigStrictly())); }
/** {@inheritDoc} */ public AFPRendererConfig build(FOUserAgent userAgent, Configuration cfg) throws FOPException { boolean strict = userAgent.validateUserConfigStrictly(); AFPRendererConfig config = null; AFPEventProducer eventProducer = AFPEventProducer.Provider.get(userAgent.getEventBroadcaster()); try { config = new ParserHelper(cfg, userAgent.getFontManager(), strict, eventProducer).config; } catch (ConfigurationException e) { LogUtil.handleException(LOG, e, strict); } return config; }
@Override protected FontCollection getCustomFontCollection(InternalResourceResolver uriResolverWrapper, String mimeType) throws FOPException { AFPRendererConfig config = (AFPRendererConfig) getRendererConfig(mimeType); if (config != null) { try { return new AFPFontCollection(userAgent.getEventBroadcaster(), createFontsList( config.getFontInfoConfig(), mimeType)); } catch (IOException e) { eventProducer.invalidConfiguration(this, e); LogUtil.handleException(log, e, userAgent.validateUserConfigStrictly()); } catch (IllegalArgumentException iae) { eventProducer.invalidConfiguration(this, iae); LogUtil.handleException(log, iae, userAgent.validateUserConfigStrictly()); } } return new AFPFontCollection(userAgent.getEventBroadcaster(), null); }