You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Matthias Müller <py...@yahoo.de> on 2007/03/08 11:03:01 UTC
Relative 'fontBaseDir' path with FOP 0.20.5
Hi there,
I use Cocoon 2.1.9 and FOP 0.20.5 (since i don't have a clue how to upgrade the FOP version), to generate PDF output.
I embed special fonts as described in the FOP Configuration: http://xmlgraphics.apache.org/fop/0.20.5/configuration.html
Somehow the entry fontBaseDir except only absolute path values like:
----------------------
<entry>
<key>fontBaseDir</key>
<value>C:\workspace\Cocoon\build\webapp\projekt\fonts</value>
</entry>
---------------------
Is there a possibility to add a relative path here? I read that if it isn't specified, the value from baseDir is used. I don't use the baseDir entry since it also only exceptes absolute path values.
Any ideas? Greetings Matthias
___________________________________________________________
Telefonate ohne weitere Kosten vom PC zum PC: http://messenger.yahoo.de
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org
Re: Relative 'fontBaseDir' path with FOP 0.20.5
Posted by Tobia <to...@linux.it>.
Matthias Müller wrote
> Is there a possibility to add a relative path here?
I had a similar problem when I tried to embed fonts following these
instructions http://cocoon.apache.org/2.1/userdocs/pdf-serializer.html
I solved it with a dynamically generated config file.
root sitemap.xmap:
<serializer name="fo2pdf" ...>
<user-config>cocoon://font-config</user-config>
</serializer>
...
<match pattern="font-config">
<generate src="context://WEB-INF/fonts/config.jx" type="jx"/>
<serialize type="xml"/>
</match>
WEB-INF/fonts/config.jx:
<configuration xmlns:jx="...">
<jx:set var="fontdir" value="${context.getRealPath('/WEB-INF/fonts')}"/>
<fonts>
<font metrics-file="${fontdir}/verdana.xml" kerning="yes"
embed-file="${fontdir}/verdana.ttf">
<font-triplet name="Verdana" weight="normal" style="normal"/>
</font>
...
</fonts>
</configuration>
It's a bit hacked together, but it works everywhere.
Tobia
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org