diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/documentation/content/xdocs/trunk/configuration.xml | 12 | ||||
-rw-r--r-- | src/java/org/apache/fop/apps/FopFactoryConfigurator.java | 12 |
2 files changed, 24 insertions, 0 deletions
diff --git a/src/documentation/content/xdocs/trunk/configuration.xml b/src/documentation/content/xdocs/trunk/configuration.xml index 08463b9b9..7fc0d97d9 100644 --- a/src/documentation/content/xdocs/trunk/configuration.xml +++ b/src/documentation/content/xdocs/trunk/configuration.xml @@ -152,6 +152,18 @@ <td>"height" 11 inches, "width" 8.26 inches</td> </tr> <tr> + <td>prefer-renderer</td> + <td>boolean (true, false)</td> + <td> + By default, FOP prefers the newer output implementations based on the + <code>IFDocumentHandler</code> interface. If no such implementation can be found for + a given MIME type, it looks for an implementation of the <code>Renderer</code> interface. + If necessary, you can invert the lookup order to prefer the Renderer variant over the + IFDocumentHandler variant by setting this value to true. + </td> + <td>false</td> + </tr> + <tr> <td>use-cache</td> <td>boolean (true, false)</td> <td>All fonts information that has been gathered as a result of "directory" diff --git a/src/java/org/apache/fop/apps/FopFactoryConfigurator.java b/src/java/org/apache/fop/apps/FopFactoryConfigurator.java index e71173845..2beb5373c 100644 --- a/src/java/org/apache/fop/apps/FopFactoryConfigurator.java +++ b/src/java/org/apache/fop/apps/FopFactoryConfigurator.java @@ -61,6 +61,8 @@ public class FopFactoryConfigurator { /** Defines the default target resolution (72dpi) for FOP */ public static final float DEFAULT_TARGET_RESOLUTION = 72.0f; //dpi + private static final String PREFER_RENDERER = "prefer-renderer"; + /** logger instance */ private final Log log = LogFactory.getLog(FopFactoryConfigurator.class); @@ -173,6 +175,16 @@ public class FopFactoryConfigurator { } } + // prefer Renderer over IFDocumentHandler + if (cfg.getChild(PREFER_RENDERER, false) != null) { + try { + factory.getRendererFactory().setRendererPreferred( + cfg.getChild(PREFER_RENDERER).getValueAsBoolean()); + } catch (ConfigurationException e) { + LogUtil.handleException(log, e, strict); + } + } + // configure font manager FontManager fontManager = factory.getFontManager(); FontManagerConfigurator fontManagerConfigurator = new FontManagerConfigurator(cfg); |