forrest-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Børre Gaup <>
Subject Re: greek characters work for pdf
Date Tue, 10 Oct 2006 13:59:27 GMT
Bear, golggotmánu 6. b. 2006 20.11, Evangelos Vlachogiannis čálii:
> also pdf table of contents is fine!! but still text appears "######"

I had the same problem for the sami characters šŧŋđžč.

I got this working by embedding characters into the pdfs. 

I began by reading 

These are the steps I took to make it work (works on Linux and Mac OS X):

1. Make a directory <yourproject>/src/documentation/resources/fonts
2. Download DejaVu truetype fonts.
2. Unpack the fonts in to the above mentioned fonts directory
3. Create font metrics files. This is done on the command line.
cd <yourproject>/src/documentation/resources/fonts
for i in *.ttf do;
java -cp "$FORREST_HOME/lib/core/fop-0.20.5.jar;
org.apache.fop.fonts.apps.TTFReader $i $i.xml;done

There are 21 different font files in the dejavu archive, so the previous line 
will go through them one by one, and make font metrics files for each and 
everyone of them. The alternative is to write:

java -cp "$FORREST_HOME/lib/core/fop-0.20.5.jar;
org.apache.fop.fonts.apps.TTFReader <fontfile> <fontfile>.xml

for each and everyone of the font files ...

4. Create a custom font configuration file. I attach the one I use. 
Notice that it has absolute paths, so you will have to change them to fit to 
your directory structure. ( I tried to make this work without absolute paths, 
but to no avail).

5. Configure the fo2pdf serializer
Open the file 

Change the stanza:
<map:serializer name="fo2pdf"

<map:serializer name="fo2pdf"

After that:
cd $FORREST_HOME/plugins/org.apache.forrest.plugin.output.pdf
ant local-deploy

Then your changes ought to emerge in 

6. Make forrest use these changes:
a. Copy the directory $FORREST_HOME/main/webapp/skins/common to 
<yourproject>/src/documentation/skins. That means inside the directory 
<yourprojectr>/src/documentations/skins you should have a directory called 
common when you are finished copying ... ;)

b. Edit the files in common/xslt/fo/
I attach mine, change to suit your taste.

There sure has snuck some errors into this explanation, there are plenty of 
stepping stones. So please give feedback if this was of any use.

Børre Gaup, Tromsø

View raw message