You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by "Scherler, Thorsten" <Th...@weidmueller.de> on 2002/11/15 15:37:48 UTC

FOP - Adding Font and compile the fop.jar for cocoon?

Hello group,

I have compiled a fop.jar where Arial is supported (I am not sure whether it is compiled right). Now I replace the PATHTo\webapps\cocoon\WEB-INF\lib\fop-0.20.3.jar with the new fop.jar. I have name it fop-0.20.3.jar again. But now I am getting this error:
ERROR
The org.apache.cocoon.components.treeprocessor.sitemap.PipelineNode notifies that org.apache.avalon.framework.configuration.ConfigurationException says:

Type 'fo2pdf' is not defined for 'serialize' at file:/C:/bin/cms/build/jakarta-tomcat-4.0.4/webapps/cocoon/weidmueller/live-sitemap.xmap:54:35 

More precisely:

org.apache.avalon.framework.configuration.ConfigurationException: Type 'fo2pdf' is not defined for 'serialize' at file:/C:/bin/cms/build/jakarta-tomcat-4.0.4/webapps/wyona-cms/wyona/cms/pubs/weidmueller/live-sitemap.xmap:54:35 


But in the above mentioned sitemap there is <map:serializer name="fo2pdf" src="org.apache.cocoon.serialization.FOPSerializer" logger="sitemap.serializer.fo2pdf" mime-type="application/pdf"/>. Which is working fine withe original fop.jar of cocoon. 

What am I doing wrong?

BACKGROUND:
I found this page:
http://xml.apache.org/fop/fonts.html

I did (there is a error if you use the original [...C:\myfonts\arial.ttf C:\myfonts\arial.ttf arial.xml]):
java -cp build\fop.jar;lib\xercesImpl-2.0.1.jar;lib\xml-apis.jar;lib\xalan-2.3.1.jar;lib\batik.jar org.apache.fop.fonts.apps.TTFReader C:\myfonts\arial.ttf C:\myfonts\arial.xml 

Now I have:
TTF Reader v1.1.1

Reading C:\myfonts\arial.ttf...

Number of glyphs in font: 1296
Creating xml font file...

Creating CID encoded metrics
Writing xml font file C:\myfonts\arial.xml...

This font contains no embedding license restrictions

Then I did:
Register the fonts within FOP
Edit conf/userconfig.xml and add entries for the font if the fonts section, ie:
 <font metrics-file="arial.xml" kerning="yes" embed-file="arial.ttf">
    <font-triplet name="Arial" style="normal" weight="normal"/>
    <font-triplet name="ArialMT" style="normal" weight="normal"/>
 </font>

BUT I am using FOP as servlet (Tomcat and cocoon). I now have to compile a fop.jar with my userconfig.xml, or not?
Then I have to replace the old fop.jar @tomcat\webapps\cocoon\WEB-INF\lib. And then I have Arial within fo, or not


> Mit freundlichem Gruss,
> 
> Thorsten Scherler
> Marketing / Telefonmarketing
> 
> Weidmüller GmbH & Co.
> P.O. Box 2807
> 33058 Paderborn
> Tel.:+ 49 - 5252-960-350
> Fax:+ 49 - 5252-960-116
> eMail: thorsten.scherler@weidmueller.de
> http://www.weidmueller.de
> 
> 

---------------------------------------------------------------------
Please check that your question  has not already been answered in the
FAQ before posting.     <http://xml.apache.org/cocoon/faq/index.html>

To unsubscribe, e-mail:     <co...@xml.apache.org>
For additional commands, e-mail:   <co...@xml.apache.org>


Re: FOP - Adding Font and compile the fop.jar for cocoon?

Posted by Denis <de...@aic-info.com>.
Hi Thorsten,

Once you created the xml font file, you should just update the
'conf/config.xml' file
that is included with the fop package shipped with cocoon and not replacing
this jar.
I got it working chinese chars and other ttf fonts.

Regards,

Denis

----- Original Message -----
From: "Scherler, Thorsten" <Th...@weidmueller.de>
To: "Cocoon-Dev (E-Mail)" <co...@xml.apache.org>; "Cocoon-Users
(E-Mail)" <co...@xml.apache.org>
Sent: Friday, November 15, 2002 3:37 PM
Subject: FOP - Adding Font and compile the fop.jar for cocoon?


Hello group,

I have compiled a fop.jar where Arial is supported (I am not sure whether it
is compiled right). Now I replace the
PATHTo\webapps\cocoon\WEB-INF\lib\fop-0.20.3.jar with the new fop.jar. I
have name it fop-0.20.3.jar again. But now I am getting this error:
ERROR
The org.apache.cocoon.components.treeprocessor.sitemap.PipelineNode notifies
that org.apache.avalon.framework.configuration.ConfigurationException says:

Type 'fo2pdf' is not defined for 'serialize' at
file:/C:/bin/cms/build/jakarta-tomcat-4.0.4/webapps/cocoon/weidmueller/live-
sitemap.xmap:54:35

More precisely:

org.apache.avalon.framework.configuration.ConfigurationException: Type
'fo2pdf' is not defined for 'serialize' at
file:/C:/bin/cms/build/jakarta-tomcat-4.0.4/webapps/wyona-cms/wyona/cms/pubs
/weidmueller/live-sitemap.xmap:54:35


But in the above mentioned sitemap there is <map:serializer name="fo2pdf"
src="org.apache.cocoon.serialization.FOPSerializer"
logger="sitemap.serializer.fo2pdf" mime-type="application/pdf"/>. Which is
working fine withe original fop.jar of cocoon.

What am I doing wrong?

BACKGROUND:
I found this page:
http://xml.apache.org/fop/fonts.html

I did (there is a error if you use the original [...C:\myfonts\arial.ttf
C:\myfonts\arial.ttf arial.xml]):
java -cp
build\fop.jar;lib\xercesImpl-2.0.1.jar;lib\xml-apis.jar;lib\xalan-2.3.1.jar;
lib\batik.jar org.apache.fop.fonts.apps.TTFReader C:\myfonts\arial.ttf
C:\myfonts\arial.xml

Now I have:
TTF Reader v1.1.1

Reading C:\myfonts\arial.ttf...

Number of glyphs in font: 1296
Creating xml font file...

Creating CID encoded metrics
Writing xml font file C:\myfonts\arial.xml...

This font contains no embedding license restrictions

Then I did:
Register the fonts within FOP
Edit conf/userconfig.xml and add entries for the font if the fonts section,
ie:
 <font metrics-file="arial.xml" kerning="yes" embed-file="arial.ttf">
    <font-triplet name="Arial" style="normal" weight="normal"/>
    <font-triplet name="ArialMT" style="normal" weight="normal"/>
 </font>

BUT I am using FOP as servlet (Tomcat and cocoon). I now have to compile a
fop.jar with my userconfig.xml, or not?
Then I have to replace the old fop.jar @tomcat\webapps\cocoon\WEB-INF\lib.
And then I have Arial within fo, or not


> Mit freundlichem Gruss,
>
> Thorsten Scherler
> Marketing / Telefonmarketing
>
> Weidmüller GmbH & Co.
> P.O. Box 2807
> 33058 Paderborn
> Tel.:+ 49 - 5252-960-350
> Fax:+ 49 - 5252-960-116
> eMail: thorsten.scherler@weidmueller.de
> http://www.weidmueller.de
>
>

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



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