hi nafise

you have to use compiled fonts 

http://xml.apache.org/fop/fonts.html

and then force cocoon to use those fonts
for this you have to create a fop-config.xml
in web-inf

for example the content of my fop-config:
<configuration>
        <fonts>
                <font metrics-file="c:/fop-fonts/arial.ttf.xml" 
kerning="yes" embed-file="c:/fop-fonts/win/arial.ttf">
                        <font-triplet name="Arial" style="normal" 
weight="normal"/>
                        <font-triplet name="ArialMT" style="normal" 
weight="normal"/>
                </font>
                <font metrics-file="c:/fop-fonts/arialb.ttf.xml" 
kerning="yes" embed-file="c:/fop-fonts/win/arialb.ttf">
                        <font-triplet name="Arial" style="normal" 
weight="bold"/>
                        <font-triplet name="ArialMT" style="normal" 
weight="bold"/>
                </font>
                <font metrics-file="c:/fop-fonts/arialbi.ttf.xml" 
kerning="yes" embed-file="c:/fop-fonts/win/arialbi.ttf">
                        <font-triplet name="Arial" style="italic" 
weight="bold"/>
                        <font-triplet name="ArialMT" style="italic" 
weight="bold"/>
                </font>
                <font metrics-file="c:/fop-fonts/ariali.ttf.xml" 
kerning="yes" embed-file="c:/fop-fonts/win/ariali.ttf">
                        <font-triplet name="Arial" style="italic" 
weight="normal"/>
                        <font-triplet name="ArialMT" style="italic" 
weight="normal"/>
                </font>
        </fonts>
</configuration>



and finaly you have to register this fop-confing in your sitemap:
...
                        <map:serializer logger="sitemap.serializer.fo2pdf" 
mime-type="application/pdf" name="fo2pdf" 
src="org.apache.cocoon.serialization.FOPSerializer">
                                
<user-config>c:\fop-fonts\config.xml</user-config>
                        </map:serializer>
...


--stavros


[cocoon doc] 
http://cocoon.apache.org/2.1/userdocs/serializers/pdf-serializer.html

On Wed, 22 Dec 2004, nafise hassani wrote:

> hi
> I use cocoon as a framework and I want to output a pdf
> using "fo2pdf" serializer also I want to create arabic
> content in my pdfs I set the charencoding in my xml
> file(src for generator) to "UTF-8" and prepare arabic
> content in them
> but outputted pdf can't display the arabic char
> correctly
> 
> any suggestion???????
> is there any fault in cocoon "fo2pdf" serializer for
> showing charachters in languages like arabic????
> 
> 
>       
>               
> __________________________________ 
> Do you Yahoo!? 
> Yahoo! Mail - You care about security. So do we. 
> http://promotions.yahoo.com/new_mail
> 

Reply via email to