cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Eike Jordan <jor...@fiz-chemie.de>
Subject Re: FOP configuration ?!?
Date Thu, 06 Aug 2009 11:56:22 GMT
Søren Krum wrote:
> Hello!
> 
> i am trying out pdf serialisation, but the fop process is not interested 
> in finding the metrics file.
> 
> I wrote a configuration like this:
> 
> <configuration>
>  <fonts>
>    <font metrics-file="file:ocrb.xml" embed-file="file:ocrb.ttf" 
> kerning="yes">
>      <font-triplet name="OCRB" style="normal" weight="normal"/>
>      <font-triplet name="OCRB" style="normal" weight="bold"/>      </font>
> ...

The FOPFactory.setBaseDir currently does not use the Cocoon source resolver,
that is in order to resolve relative URLs you have to use standard protocols.

In our configuration we use the context:// protocol. Something like

<font metrics-file="context://your/webapp/block/context/fonts/ocrb.xml"
   embed-file="context://your/webapp/block/context/fonts/ocrb.ttf"
   kerning="yes">
   <font-triplet name="OCRB" style="normal" weight="normal"/>
   <font-triplet name="OCRB" style="normal" weight="bold"/>
</font>

should work. You possibly might have to remove the <base>.</base> setting
in your fop.xconf as is was required in our environment.

HTH
~eike

> 
> 
>  From the documentation :
> ---------8<------------
> I normally store this with the metrics file in the fop-fonts directory 
> (called config.xml (ensure there's not a font called config ;)) although 
> I fully qualify all the filenames just incase I move it ;)
> ---------8<------------
> i would suggest that if the config file is placed in the same directory 
> as the metrics file, fop processen should be able to find the metrics, 
> but what i get is this:
> 
> ERROR TP-Processor1 cocoon.fop - Failed to read font metrics file 
> file:ocrb.xml: ocrb.xml (No such file or directory)
> 
> But then, if i remove "file:" from the metrics file, the process 
> complains over a protocoll missing. So the documentaion is probably not 
> so actual :-(
> 
> Any hints where the process start searching? Or is it supposed to work 
> as described? After i thought to have the metric files and even the 
> fonts as part of one block, i would really like if the fop process would 
> start searching in the directory of the config file ;-)
> 
> Best Regards
> 


-- 
Eike Jordan  <jordan@fiz-chemie.de>

| FIZ CHEMIE BERLIN
| Franklin Str. 11               ------    ,__o
| 10587 Berlin                  ------   _-\_<,
|                              ------   (+)/'(+)
| Tel. : 0049-30-39977 214


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Mime
View raw message