/** {@inheritDoc} */ public synchronized void processEvent(Event event) { if (event.getEventID().startsWith(FOVALIDATION_EVENT_ID_PREFIX)) { Boolean canRecover = (Boolean)event.getParam("canRecover"); if (Boolean.TRUE.equals(canRecover) && !userAgent.validateStrictly()) { //Reduce severity if FOP can recover event.setSeverity(EventSeverity.WARN); } } else if (event.getEventID().startsWith(BLOCK_LEVEL_EVENT_ID_PREFIX)) { Boolean canRecover = (Boolean)event.getParam("canRecover"); if (Boolean.TRUE.equals(canRecover)) { //Reduce severity if FOP can recover event.setSeverity(EventSeverity.WARN); } } this.delegate.processEvent(event); }
/** * Make sure content model satisfied, if so then tell the * FOEventHandler that we are at the end of the flow. * {@inheritDoc} */ public void endOfNode() throws FOPException { if (firstChild == null && getUserAgent().validateStrictly()) { missingChildElementError("(%block;)+"); } getFOEventHandler().endStatic(this); }
/** {@inheritDoc} */ public Java2DRendererConfig build(FOUserAgent userAgent, Configuration cfg) throws FOPException { Java2DRendererConfig config = new Java2DRendererConfig(new DefaultFontConfigParser() .parse(cfg, userAgent.validateStrictly(), new FontEventAdapter(userAgent.getEventBroadcaster()))); boolean value = cfg.getChild( JAVA2D_TRANSPARENT_PAGE_BACKGROUND.getName(), true).getValueAsBoolean(false); config.params.put(JAVA2D_TRANSPARENT_PAGE_BACKGROUND, value); return config; }
public PNGRendererConfig build(FOUserAgent userAgent, Configuration cfg) throws FOPException { return new PNGRendererConfig(new DefaultFontConfigParser().parse(cfg, userAgent.validateStrictly(), new FontEventAdapter(userAgent.getEventBroadcaster()))); }
/** {@inheritDoc} */ public RendererConfig build(FOUserAgent userAgent, Configuration cfg) throws FOPException { return new IFRendererConfig(new DefaultFontConfigParser().parse(cfg, userAgent.validateStrictly(), new FontEventAdapter(userAgent.getEventBroadcaster()))); }
/** {@inheritDoc} */ public TxtRendererConfig build(FOUserAgent userAgent, Configuration cfg) throws FOPException { TxtRendererConfig config = new TxtRendererConfig(new DefaultFontConfigParser().parse(cfg, userAgent.validateStrictly(), new FontEventAdapter(userAgent.getEventBroadcaster()))); if (cfg != null) { TxtRendererOption option = TxtRendererOption.ENCODING; String value = cfg.getChild(option.getName(), true).getValue(null); config.params.put(option, value != null ? value : option.getDefaultValue()); } return config; }
public BitmapRendererConfig build(FOUserAgent userAgent, Configuration cfg) throws FOPException { BitmapRendererConfig config = new BitmapRendererConfig(new DefaultFontConfigParser() .parse(cfg, userAgent.validateStrictly(), new FontEventAdapter(userAgent.getEventBroadcaster()))); build(config, userAgent, cfg); return config; }
/** {@inheritDoc} */ public PCLRendererConfig build(FOUserAgent userAgent, Configuration cfg) throws FOPException { PCLRendererConfig config = new PCLRendererConfig(new DefaultFontConfigParser() .parse(cfg, userAgent.validateStrictly(), new FontEventAdapter(userAgent.getEventBroadcaster()))); configure(cfg, config); return config; }
tableFooterFound = true; if (tableBodyFound) { if (getUserAgent().validateStrictly()) { nodesOutOfOrderError(loc, "fo:table-footer", "(table-body+)", true);
private ParserHelper(Configuration cfg, FOUserAgent userAgent) throws ConfigurationException, FOPException { config = new PSRendererConfig(new DefaultFontConfigParser().parse(cfg, userAgent.validateStrictly(), new FontEventAdapter(userAgent.getEventBroadcaster()))); if (cfg != null) { setBoolConfigParam(cfg, AUTO_ROTATE_LANDSCAPE); setConfigParameter(LANGUAGE_LEVEL, cfg.getChild(LANGUAGE_LEVEL.getName()) .getValueAsInteger((Integer) LANGUAGE_LEVEL.getDefaultValue())); setBoolConfigParam(cfg, OPTIMIZE_RESOURCES); setBoolConfigParam(cfg, SAFE_SET_PAGE_DEVICE); setBoolConfigParam(cfg, DSC_COMPLIANT); setBoolConfigParam(cfg, ACROBAT_DOWNSAMPLE); Configuration child = cfg.getChild("rendering"); if (child != null) { config.params.put(RENDERING_MODE, PSRenderingMode.valueOf(child.getValue( RENDERING_MODE.getDefaultValue().toString()) .toUpperCase(Locale.ENGLISH))); } } }
/** {@inheritDoc} */ public TIFFRendererConfig build(FOUserAgent userAgent, Configuration cfg) throws FOPException { config = new TIFFRendererConfig(new DefaultFontConfigParser() .parse(cfg, userAgent.validateStrictly(), new FontEventAdapter(userAgent.getEventBroadcaster()))); super.build(config, userAgent, cfg); if (cfg != null) { setParam(TIFFRendererOption.COMPRESSION, TIFFCompressionValue.getType(getValue(cfg, TIFFRendererOption.COMPRESSION))); setParam(TIFFRendererOption.SINGLE_STRIP, Boolean.valueOf(getValue(cfg, TIFFRendererOption.SINGLE_STRIP))); setParam(TIFFRendererOption.ENDIANNESS, Endianness.getEndianType(getValue(cfg, TIFFRendererOption.ENDIANNESS))); } return config; } }