allow embedd fonts from jar-file for pdf creation
fonts can now added in fop configuration via classpath notation. Also added FreeSans.ttf
This commit is contained in:
@@ -21,6 +21,7 @@
|
||||
package org.mustangproject.ZUGFeRD;
|
||||
|
||||
import org.apache.fop.apps.*;
|
||||
import org.apache.fop.apps.io.ResourceResolverFactory;
|
||||
import org.apache.fop.configuration.Configuration;
|
||||
import org.apache.fop.configuration.ConfigurationException;
|
||||
import org.apache.fop.configuration.DefaultConfigurationBuilder;
|
||||
@@ -304,6 +305,11 @@ public class ZUGFeRDVisualizer {
|
||||
|
||||
FopFactory fopFactory = builder.build();//FopFactory.newInstance(new File("c:\\Users\\jstaerk\\temp\\fop-config.xconf"));
|
||||
|
||||
fopFactory.getFontManager().setResourceResolver(
|
||||
ResourceResolverFactory.createInternalResourceResolver(
|
||||
new File(".").toURI(),
|
||||
new ClasspathResolverURIAdapter()));
|
||||
|
||||
FOUserAgent userAgent = fopFactory.newFOUserAgent();
|
||||
|
||||
userAgent.getRendererOptions().put("pdf-a-mode", "PDF/A-1b");
|
||||
|
||||
Reference in New Issue
Block a user