Search in sources :

Example 1 with EnvironmentProfile

use of org.apache.fop.apps.EnvironmentProfile in project xwiki-platform by xwiki.

the class FOPXSLFORenderer method initialize.

@Override
public void initialize() throws InitializationException {
    EnvironmentProfile environmentProfile = EnvironmentalProfileFactory.createDefault(new File(".").toURI(), this.resourceResolver);
    FopFactoryBuilder builder = new FopFactoryBuilder(environmentProfile);
    Configuration configuration = loadConfiguration();
    if (configuration != null) {
        builder.setConfiguration(configuration);
    }
    this.fopFactory = builder.build();
}
Also used : FopFactoryBuilder(org.apache.fop.apps.FopFactoryBuilder) DefaultConfiguration(org.apache.avalon.framework.configuration.DefaultConfiguration) Configuration(org.apache.avalon.framework.configuration.Configuration) EnvironmentProfile(org.apache.fop.apps.EnvironmentProfile) File(java.io.File)

Example 2 with EnvironmentProfile

use of org.apache.fop.apps.EnvironmentProfile in project xwiki-platform by xwiki.

the class XHTML2FOTest method setUp.

@BeforeClass
public static void setUp() throws Exception {
    EnvironmentProfile environmentProfile = EnvironmentalProfileFactory.createDefault(new File(".").toURI(), ResourceResolverFactory.createDefaultResourceResolver());
    FopFactoryBuilder builder = new FopFactoryBuilder(environmentProfile);
    fopFactory = builder.build();
    foUserAgent = fopFactory.newFOUserAgent();
    transformerFactory = TransformerFactory.newInstance();
}
Also used : FopFactoryBuilder(org.apache.fop.apps.FopFactoryBuilder) EnvironmentProfile(org.apache.fop.apps.EnvironmentProfile) File(java.io.File) BeforeClass(org.junit.BeforeClass)

Aggregations

File (java.io.File)2 EnvironmentProfile (org.apache.fop.apps.EnvironmentProfile)2 FopFactoryBuilder (org.apache.fop.apps.FopFactoryBuilder)2 Configuration (org.apache.avalon.framework.configuration.Configuration)1 DefaultConfiguration (org.apache.avalon.framework.configuration.DefaultConfiguration)1 BeforeClass (org.junit.BeforeClass)1