ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tb...@gmx.de
Subject Re: RE: Ant Task for FOP
Date Fri, 25 Aug 2006 20:14:20 GMT
Hi
The <style> element was the the one I looked for.
I did it that way. 

<project default="main">

<property name="fop.dir" value="path\fop\lib\"/>
<taskdef name="fop"
classname="org.apache.fop.tools.anttasks.Fop">
<classpath>
<pathelement location="path\build\fop.jar"/>
<pathelement location="${fop.dir}\batik-all-1.6.jar"/>
<pathelement location="${fop.dir}\avalon-framework-4.2.0.jar"/>
<pathelement location="${fop.dir}\commons-logging-1.0.4.jar"/>
<pathelement location="${fop.dir}\commons-io-1.1.jar"/>
</classpath>
</taskdef>

<!-- xml to fo -->
<target name="pdf">
<xslt in="path\Test.xml" out="path\fo\result.fo"
style="path\stylesheet.xsl">
</xslt>
</target>

<!-- fo to pdf -->
<target name="generate-pdf" description="Generates a single PDF file" depends="pdf">
<fop format="application/pdf" userconfig="path\conf\userconfig.xml"
fofile="path\fo\result.fo"
outfile="path\pdf\Demo.pdf" />
</target>
</project>

Now everything works fine. 
Thanks and have a nice day
TBL

-------- Original-Nachricht --------
Datum: Fri, 25 Aug 2006 18:15:02 +0200
Von: "RADEMAKERS Tanguy" <Tanguy.RADEMAKERS@swift.com>
An: "Ant Users List" <user@ant.apache.org>
Betreff: RE: Ant Task for FOP

> Hello,
> 
> Not quite sure if i'm understanding the question, but as far as i can
> ascertain from a quick look at the website, FO files are in fact xml, so i
> would say that your best bet would be to generate them using xsl
> transformations. Ant has a <style> task to do this (consult the docco)
> 
> /t 
> 
> >-----Original Message-----
> >From: tblhh@gmx.de [mailto:tblhh@gmx.de] 
> >Sent: Friday, August 25, 2006 5:08 PM
> >To: user@ant.apache.org
> >Subject: Ant Task for FOP
> >
> >Hi,
> >I have a question concerning an Ant Task for FOP.
> >I want to transform documents from xml to pdf. I found an fop 
> >ant task in
> >http://xmlgraphics.apache.org/fop/0.92/anttask.html
> >but there is just the transformin from fo files to pdf.
> >So, I have to define a task for generating xml files to fo.
> >I´m new to ant, so I could need some help or some hints how to do it.
> >
> >Thanks a lot and have a nice day
> >TBL
> >-- 
> >
> >
> >Echte DSL-Flatrate dauerhaft für 0,- Euro*. Nur noch kurze Zeit!
> >"Feel free" mit GMX DSL: http://www.gmx.net/de/go/dsl
> >
> >---------------------------------------------------------------------
> >To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> >For additional commands, e-mail: user-help@ant.apache.org
> >
> >
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> For additional commands, e-mail: user-help@ant.apache.org

-- 


Der GMX SmartSurfer hilft bis zu 70% Ihrer Onlinekosten zu sparen!
Ideal für Modem und ISDN: http://www.gmx.net/de/go/smartsurfer

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Mime
View raw message