04-20-2012 04:03 PM
<fop version="0.94">
<!– Base URL for resolving relative URLs –>
<base>./</base>
<!– Font Base URL for resolving relative font URLs –>
<font-base>./</font-base>
<renderer mime="application/postscript">
<fonts>
<font kerning="yes" embed-url="/fonts/arial.ttf" encoding-mode="auto">
<font-triplet name="Arial" style="normal" weight="normal" />
</font>
</fonts>
</renderer>
</fop>
//ClasspathUriResolver
import java.io.InputStream;
import javax.xml.transform.Source;
import javax.xml.transform.TransformerException;
import javax.xml.transform.URIResolver;
import javax.xml.transform.stream.StreamSource;
public class ClasspathUriResolver implements URIResolver
{
public Source resolve(String href, String base) throws TransformerException
{
Source source = null;
InputStream inputStream = ClassLoader.getSystemResourceAsStream(href);
if (inputStream != null)
{
source = new StreamSource(inputStream);
}
return source;
}
}
FopFactory fopFactory = FopFactory.newInstance();
FOURIResolver uriResolver = (FOURIResolver)fopFactory.getURIResolver();
uriResolver.setCustomURIResolver(new ClasspathUriResolver());
FOUserAgent foUserAgent = fopFactory.newFOUserAgent();
04-25-2012 11:00 AM
<renderer mime="application/pdf">
<filterList>
<!– provides compression using zlib flate (default is on) –>
<value>flate</value>
<!– encodes binary data into printable ascii characters (default off)
This provides about a 4:5 expansion of data size –>
<!– <value>ascii-85</value> –>
<!– encodes binary data with hex representation (default off)
This filter is not recommended as it doubles the data size –>
<!– <value>ascii-hex</value> –>
</filterList>
<fonts>
<font kerning="yes"
embed-url="fonts/helv_lt_77_bold_cond.ttf">
<font-triplet name="HelveticaNeueLT57Cn" style="normal" weight="bold"/>
</font>
<font kerning="yes"
embed-url="fonts/helv_lt_47_light_cond.ttf">
<font-triplet name="HelveticaNeueLT47LightCn" style="normal" weight="200"/>
</font>
</fonts>
<!– This option lets you specify additional options on an XML handler –>
<!–xml-handler namespace="http://www.w3.org/2000/svg">
<stroke-text>false</stroke-text>
</xml-handler–>
</renderer>
Tags
Find what you came for
We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.