You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by "Morrison, John" <Jo...@uk.experian.com> on 2001/09/17 16:06:38 UTC

Ant FOP task

Hi All,

Does anybody have a build.xml file which demonstrates how to take xml+xslt
files and produce a pdf with the ant fop class? (if yes, could you email it
to me either on or off list ;)

Thanks,

J.


=======================================================================
Information in this email and any attachments are confidential, and may
not be copied or used by anyone other than the addressee, nor disclosed
to any third party without our permission.  There is no intention to
create any legally binding contract or other commitment through the use
of this email.

Experian Limited (registration number 653331).  
Registered office: Talbot House, Talbot Street, Nottingham NG1 5HF

Re: Ant FOP task

Posted by Matthew Inger <ma...@sedonacorp.com>.
there is a command line class in

org.apache.fop.apps

in v 0.20, I believe the name of the class is "Fop"

just run the class with no arguments, and it will give you
the usage.  You can then use the "<java>" tasks
to transform your xml to fop, and then use Fop to turn it into
a pdf (fop will due the xsl transformation for you).


<java  classname="org.apache.fop.apps.Fop">
       <arg value="-xsl" />
       <arg value="foo.xsl" />
       <arg value="-xml" />
       <arg value="foo.xml" />
       <arg value="-pdf" />
       <arg value="foo.pdf" />
</java>

OR (to do the transformation yourself)

<style basedir="."
       destdir="."
       includes="foo.xml"
       extension="fo"
       style="foo.xsl" />
<java  classname="org.apache.fop.apps.Fop">
       <arg value="-fo" />
       <arg value="foo.fo" />
       <arg value="-pdf" />
       <arg value="foo.pdf" />
</java>
       


On Mon, 2001-09-17 at 10:06, Morrison, John wrote:
> Hi All,
> 
> Does anybody have a build.xml file which demonstrates how to take xml+xslt
> files and produce a pdf with the ant fop class? (if yes, could you email it
> to me either on or off list ;)
> 
> Thanks,
> 
> J.
> 
> 
> =======================================================================
> Information in this email and any attachments are confidential, and may
> not be copied or used by anyone other than the addressee, nor disclosed
> to any third party without our permission.  There is no intention to
> create any legally binding contract or other commitment through the use
> of this email.
> 
> Experian Limited (registration number 653331).  
> Registered office: Talbot House, Talbot Street, Nottingham NG1 5HF
-- 
Matt Inger (matt.inger@sedonacorp.com)
Sedona Corporation
455 S. Gulph Road, Suite 300
King of Prussia, PA 19406
(484) 679-2213
"Self-respect - the secure feeling that no one,
 as yet, is suspicious." -H.L. Mencken