XML Editor
Sign up for a WebBoard account Sign Up Keyword Search Search More Options... Options
Chat Rooms Chat Help Help News News Log in to WebBoard Log in Not Logged in
Show tree view Topic
Topic Page 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 Go to previous topicPrev TopicGo to next topicNext Topic
Postnext
(Deleted User) Subject: How to support other TTF if POST-Processor is FOP
Author: (Deleted User)
Date: 06 Dec 2001 03:03 AM
HI,

I'm now develop the letters the WFM project. For testing the command line command I'm using the FOP.

The problem is that it not support the Univers True Type Fond.

How can I organize that.

Kind regards,

Richard Francken
Atos Origin
eBusiness Solutions

Postnext
Minollo I.Subject: Re: How to support other TTF if POST-Processor is FOP
Author: Minollo I.
Date: 06 Dec 2001 09:33 AM
Richard,
are you saying that you need to use a post-processing different from
Apache Fop? What is it? Is that something that you can configure in the
scenario dialog and that you would also like to use from the command line?

Minollo

Postnext
(Deleted User) Subject: Re: How to support other TTF if POST-Processor is FOP
Author: (Deleted User)
Date: 10 Dec 2001 05:21 AM
What I'm saying is that I'm using the font Univers. But the FOP doesn't support this font. How can I tell the FOP to support this font?

Richard (F.) Francken

Postnext
Minollo I.Subject: Re: How to support other TTF if POST-Processor is FOP
Author: Minollo I.
Date: 10 Dec 2001 09:47 AM
I don't know how to help you here.
You probably want to contact the Apache XML/FOP group
(http://xml.apache.org/fop/index.html), who are the developers of FOP.

Minollo

Postnext
Mike SmirnovSubject: How to support other TTF if POST-Processor is FOP
Author: Mike Smirnov
Date: 14 Dec 2001 03:54 AM

On 12/6/01 3:03:54 AM, Richard Francken wrote:

>HI,
>
>I'm now develop the letters
>the WFM project. For testing
>the command line command I'm
>using the FOP.
>
>The problem is that it not
>support the Univers True Type
>Fond.

Hi, Richard!

It is easy enough to add custom true type fonts support to FOP, if you just use FOP from Apache. Following Apache instruction you should run this command for each font file:
java org.apache.fop.fonts.apps.TTFReader C:\Winnt\Fonts\univer.ttf C:\Winnt\Fonts\univer.xml
(This assumes you have Java VM installed and file fop.jar is in your CLASSPATH environment variable.)

Then you should edit your userconfig.xml file in FOP_Dir\conf. Add this lines between <fonts> and </fonts> tags (don't forget to uncomment this block):

<font metrics-file="file:///C:/WINNT/Fonts/univer.xml" kerning="yes" embed-file="C:\WINNT\Fonts\univer.ttf"> <font-triplet name="Univers" style="normal" weight="normal"/> </font> <font metrics-file="file:///C:/WINNT/Fonts/univerb.xml" kerning="yes" embed-file="C:\WINNT\Fonts\univerb.ttf">

That's all. Now when you invoke FOP do it as:

java org.apache.fop.apps.FOP -c FOP_Dir\conf\userconfig.xml some.fo some.pdf

But the problem do arise when you try to use this within Stylus Studio. I didn't managed to use FOP as custom post-processor with options needed. So I was forced to use FOP as Stylus Studio plugin. But I slightly changed the source file from FOP_Dir\src\org\apache\fop\apps\CommandLineOptions.java by including line:
userConfigFile = new File("Fop_Dir/conf/userconfig.xml"); then recompiled all sources (all you need to do just run the FOP_Dir\build.bat) and change file Stylus Studio\bin\Plugins\Fop\fop.jar into new fop.jar I built.

Sorry if it looks a bit messy. But maybe someone will propose more comfortable way to use custom fonts in FOP within Stylus Studio.

Mike Smirnov

Postnext
Minollo I.Subject: Re: How to support other TTF if POST-Processor is FOP
Author: Minollo I.
Date: 14 Dec 2001 11:22 AM
br> >java org.apache.fop.apps.FOP -c FOP_Dir\conf\userconfig.xml some.fo some.pdf
>
>But the problem do arise when you try to use this within Stylus Studio. I
>didn't managed to use FOP as custom post-processor with options needed.

I believe that if you create a custom post-processor with this options:
java org.apache.fop.apps.Fop -c FOP_Dir\conf\userconfig.xml -fo %1 %2

....things should work fine.

>But maybe someone will propose more comfortable way to use custom fonts in
>FOP within Stylus Studio.

We hear you; we'll make it easier to specify additional options to FOP
post-processing; I'm creating a new PCR for this.

Thanks for the suggested solution,
Minollo

Postnext
Mike SmirnovSubject: Re: How to support other TTF if POST-Processor is FOP
Author: Mike Smirnov
Date: 17 Dec 2001 05:40 AM
On 12/14/01 11:22:31 AM, Carlo Innocenti wrote:


>I believe that if you
>create a custom post-processor
>with this options:
> java org.apache.fop.apps.Fop -c >FOP_Dir\conf\userconfig.xml
>-fo %1 %2

>....things should
>work fine.
It actually works. Thank you.

Mike Smirnov



Postnext
(Deleted User) Subject: Re: How to support other TTF if POST-Processor is FOP
Author: (Deleted User)
Date: 23 Dec 2001 04:10 PM
I'm trying your solution, but get some problems. Do you had installed the FOP software or only the Stylus software?

Any way thanks for the help :-)

Richard Francken

Posttop
Mike SmirnovSubject: Re: How to support other TTF if POST-Processor is FOP
Author: Mike Smirnov
Date: 25 Dec 2001 07:11 AM
On 12/23/01 4:10:17 PM, Richard Francken wrote:

>I'm trying your solution, but get some >problems. Do you had installed the FOP >software or only the Stylus software? Any >way thanks for the help:-)



>Richard Francken

Yes, I have Apache Fop software installed. But there's no big difference between using FOP from its manufacturer Apache or one included in Stylus Studio. If by any reason you don't want to install Apache Fop, you should follow the next steps:
  1. Generate XML metrics for your font:
    java -cp D:\Progra~1\eXcelo~1\Stylus~1\bin\Plugins\Fop\fop.jar org.apache.fop.fonts.apps.TTFReader C:\WINNT\Fonts\univer.ttf univer.xml
  2. Create configuration file your_config.xml in any catalog. For example in ...\Stylus Studio\bin\Plugins\Fop with following text:
    
    <configuration>
    
    	<fonts>
    
     		<font metrics-file="file:///C:/WINNT/Fonts/univer.xml" kerning="yes" embed-file="C:\WINNT\Fonts\univer.ttf">
    
        	<font-triplet name="Univers" style="normal" weight="normal"/>
    
     		</font>
    
     		<font metrics-file="file:///C:/WINNT/Fonts/univerb.xml" kerning="yes" embed-file="C:\WINNT\Fonts\univerb.ttf">
    
        	<font-triplet name="Univers" style="normal" weight="bold"/>
    
     		</font>
    
     		<font metrics-file="file:///C:/WINNT/Fonts/univeri.xml" kerning="yes" embed-file="C:\WINNT\Fonts\univeri.ttf">
    
        	<font-triplet name="Univers" style="italic" weight="normal"/>
    
     		</font>
    
     		<font metrics-file="file:///C:/WINNT/Fonts/univerbi.xml" kerning="yes" embed-file="C:\WINNT\Fonts\univerbi.ttf">
    
        	<font-triplet name="Univers" style="italic" weight="bold"/>
    
     		</font>
    
    	</fonts>
    
    </configuration>
    
    				
    I have this file in Apache FOP distribution.
  3. Now in Scenario Properties for your XSL stylesheet go to Post-process tab. Check Custom Post-Process radiobutton and enter the following command line:
    java -cp D:\Progra~1\eXcelo~1\Stylus~1\bin\Plugins\Fop\fop.jar org.apache.fop.apps.Fop -c D:\Progra~1\eXcelo~1\Stylus~1\bin\Plugins\Fop\your_config.xml %1 %2
    And choose .pdf as generated file extension.
  4. That's all, I suppose.
Good luck,
Mike Smirnov

 
Topic Page 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 Go to previous topicPrev TopicGo to next topicNext Topic
Download A Free Trial of Stylus Studio 6 XML Professional Edition Today! Powered by Stylus Studio, the world's leading XML IDE for XML, XSLT, XQuery, XML Schema, DTD, XPath, WSDL, XHTML, SQL/XML, and XML Mapping!  
go

Log In Options

Site Map | Privacy Policy | Terms of Use | Trademarks
Stylus Scoop XML Newsletter:
W3C Member
Stylus Studio® and DataDirect XQuery ™are from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2016 All Rights Reserved.