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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to