You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-dev@xmlgraphics.apache.org by Jeremias Maerki <je...@outline.ch> on 2001/09/19 14:24:41 UTC

[PATCH] Enhanced FOP Ant Task

Hi there

I've done some tinkering with the FOP Ant Task, that I'd like to submit.
Currently the FOP task can only generate PDF. I changed it so it can
use the other renderers as well.

Old syntax:
<fop fofile="myfile.fo" pdffile="myfile.pdf"/>

New syntax:
<fop fofile="myfile.fo" outfile="myfile.pdf"/>
or
<fop fofile="myfile.fo" renderer="ps" outfile="myfile.ps"/>

The "renderer" attribute is optional and defaults to "pdf". Possible
values currently are: "ps", "mif", "pcl", "txt" and "at" (AreaTree XML).

Attached you find the diff for the Ant Task along with the various
updated build.xml files.

By the way: It seems that the xml-docs cannot currently be built. I get
an infinite number of ">" after page 20. I didn't investigate any
further.

Cheers,
Jeremias M�rki

mailto:jeremias.maerki@outline.ch

OUTLINE AG
Postfach 3954 - Rhynauerstr. 15 - CH-6002 Luzern
Fon +41 (41) 317 2020 - Fax +41 (41) 317 2029
Internet http://www.outline.ch

Re: [PATCH] Enhanced FOP Ant Task

Posted by Ralph LaChance <Ra...@compuserve.com>.
I stepped into this thread late in the game, but what about
equivalencies for -awt and -print.   Seems to me that -print
is presently the only way to silently drive a printer from fop
on all platforms.


At 03:26 PM 9/19/01 +0200, you wrote:
>
>Sure, good idea. I'm going to do that on Friday and repost the patch.
>
>So the changes will be (if I got everything right):
>pdf --> application/pdf
>ps --> application/postscript
>mif --> application/vnd.mif
>pcl --> application/vnd.hp-PCL
>txt --> text/plain
>at --> text/xml
>
>
>On Wed, 19 Sep 2001 14:59:24 +0200 Keiron Liddle wrote:
> >
> > Would it be possible/suitable to define the output type using a mime type.
> > ie. application/pdf
> > rather than having our own definition.
> >
> > On Wed, 19 Sep 2001 14:24:41 Jeremias Maerki wrote:
> > > Hi there
> > >
> > > I've done some tinkering with the FOP Ant Task, that I'd like to submit.
> > > Currently the FOP task can only generate PDF. I changed it so it can
> > > use the other renderers as well.
> > >
> > > Old syntax:
> > > <fop fofile="myfile.fo" pdffile="myfile.pdf"/>
> > >
> > > New syntax:
> > > <fop fofile="myfile.fo" outfile="myfile.pdf"/>
> > > or
> > > <fop fofile="myfile.fo" renderer="ps" outfile="myfile.ps"/>
> > >
> > > The "renderer" attribute is optional and defaults to "pdf". Possible
> > > values currently are: "ps", "mif", "pcl", "txt" and "at" (AreaTree XML).
> > >
> > > Attached you find the diff for the Ant Task along with the various
> > > updated build.xml files.
> > >
> > > By the way: It seems that the xml-docs cannot currently be built. I get
> > > an infinite number of ">" after page 20. I didn't investigate any
> > > further.
> > >
> > > Cheers,
> > > Jeremias Märki
> > >
> > > mailto:jeremias.maerki@outline.ch
> > >
> > > OUTLINE AG
> > > Postfach 3954 - Rhynauerstr. 15 - CH-6002 Luzern
> > > Fon +41 (41) 317 2020 - Fax +41 (41) 317 2029
> > > Internet http://www.outline.ch
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: fop-dev-unsubscribe@xml.apache.org
> > For additional commands, email: fop-dev-help@xml.apache.org
>
>Freundliche Grüsse
>OUTLINE AG
>Jeremias Märki
>
>mailto:jeremias.maerki@outline.ch
>
>Postfach 3954 - Rhynauerstr. 15 - CH-6002 Luzern
>Fon +41 (41) 317 2020 - Fax +41 (41) 317 2029
>Internet http://www.outline.ch
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: fop-dev-unsubscribe@xml.apache.org
>For additional commands, email: fop-dev-help@xml.apache.org


         ' Best,
         -Ralph LaChance



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


Re: [PATCH] Enhanced FOP Ant Task

Posted by Ralph LaChance <Ra...@compuserve.com>.
At 11:04 AM 9/24/01 +0200, you wrote:
>I didn't include support
> > for "-awt" and "-print", though. "-awt" IMHO makes not much sense in
> > this context, does it? As for "-print" I was simply too lazy. Maybe you
> > want to look at this yourself, Ralph. Sorry.

happy to (later this week) ;-)



         ' Best,
         -Ralph LaChance



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


Re: [PATCH] Enhanced FOP Ant Task

Posted by Keiron Liddle <ke...@aftexsw.com>.
Committed.
Thanks.

The npe's are probably due to a missing hints hashtable.
The logging output also needs improvement in general as you pointed out.

On Fri, 21 Sep 2001 19:52:26 Jeremias Maerki wrote:
> Hi foppers
> 
> As promised, here's the new diff for the FOP Ant Task. I've changed the
> format designators to MIME types (although the other output types are
> supported, too) and added support for filesets. I didn't include support
> for "-awt" and "-print", though. "-awt" IMHO makes not much sense in
> this context, does it? As for "-print" I was simply too lazy. Maybe you
> want to look at this yourself, Ralph. Sorry.
> 
> Some usage samples:
> 
> <fop fofile="${foDir}/normal.fo" outfile="${testDir}/normal.pdf"/>
> 
> This simply creates a PDF from a FO file.
> 
> <fop fofile="${foDir}/normal.fo" format="application/postscript"
> outfile="${testDir}/normal.ps"/>
> 
> This generates a file in a format defined by the "format" attribute.
> 
> Please notice, that I changed the "renderer" attribute (from the first
> diff) to "format". Default is still "application/pdf". You can also use
> short format types:
> 
> application/pdf = pdf
> application/postscript = ps
> application/vnd.mif = mif
> application/vnd.hp-PCL = pcl
> text/plain = txt
> text/xml = at = xml
> 
> <fop format="application/postscript" outdir="${testDir}">
>     <fileset dir="${foDir}">
>        <include name="**/*.fo"/>
>     </fileset>
> </fop>
> 
> This converts all FO files in a directory to PostScript and puts the
> newly generated files in the directory specified by the outdir attribute.
> 
> Some remarks:
> - "docs/examples/runtests newAT" produces NPEs in the XMLRenderer.
> - Output by the FOP task is currently not so beautiful.
> 
> Nice weekend to all!
> Jeremias Märki
> 
> mailto:jeremias.maerki@outline.ch
> 
> OUTLINE AG
> Postfach 3954 - Rhynauerstr. 15 - 6002 Luzern
> Fon +41 (0)41 317 2020 - Fax +41 (0)41 317 2029
> Internet http://www.outline.ch
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: fop-dev-unsubscribe@xml.apache.org
> For additional commands, email: fop-dev-help@xml.apache.org

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


Re: [PATCH] Enhanced FOP Ant Task

Posted by Jeremias Maerki <je...@outline.ch>.
Hi foppers

As promised, here's the new diff for the FOP Ant Task. I've changed the
format designators to MIME types (although the other output types are
supported, too) and added support for filesets. I didn't include support
for "-awt" and "-print", though. "-awt" IMHO makes not much sense in
this context, does it? As for "-print" I was simply too lazy. Maybe you
want to look at this yourself, Ralph. Sorry.

Some usage samples:

<fop fofile="${foDir}/normal.fo" outfile="${testDir}/normal.pdf"/>

This simply creates a PDF from a FO file.

<fop fofile="${foDir}/normal.fo" format="application/postscript" outfile="${testDir}/normal.ps"/>

This generates a file in a format defined by the "format" attribute.

Please notice, that I changed the "renderer" attribute (from the first
diff) to "format". Default is still "application/pdf". You can also use
short format types:

application/pdf = pdf
application/postscript = ps
application/vnd.mif = mif
application/vnd.hp-PCL = pcl
text/plain = txt
text/xml = at = xml

<fop format="application/postscript" outdir="${testDir}">
    <fileset dir="${foDir}">
       <include name="**/*.fo"/>
    </fileset>
</fop>

This converts all FO files in a directory to PostScript and puts the
newly generated files in the directory specified by the outdir attribute.

Some remarks:
- "docs/examples/runtests newAT" produces NPEs in the XMLRenderer.
- Output by the FOP task is currently not so beautiful.

Nice weekend to all!
Jeremias M�rki

mailto:jeremias.maerki@outline.ch

OUTLINE AG
Postfach 3954 - Rhynauerstr. 15 - 6002 Luzern
Fon +41 (0)41 317 2020 - Fax +41 (0)41 317 2029
Internet http://www.outline.ch

Re: [PATCH] Enhanced FOP Ant Task

Posted by Jeremias Maerki <je...@outline.ch>.
Sure, good idea. I'm going to do that on Friday and repost the patch.

So the changes will be (if I got everything right):
pdf --> application/pdf
ps --> application/postscript
mif --> application/vnd.mif
pcl --> application/vnd.hp-PCL
txt --> text/plain
at --> text/xml


On Wed, 19 Sep 2001 14:59:24 +0200 Keiron Liddle wrote:
> 
> Would it be possible/suitable to define the output type using a mime type.
> ie. application/pdf
> rather than having our own definition.
> 
> On Wed, 19 Sep 2001 14:24:41 Jeremias Maerki wrote:
> > Hi there
> > 
> > I've done some tinkering with the FOP Ant Task, that I'd like to submit.
> > Currently the FOP task can only generate PDF. I changed it so it can
> > use the other renderers as well.
> > 
> > Old syntax:
> > <fop fofile="myfile.fo" pdffile="myfile.pdf"/>
> > 
> > New syntax:
> > <fop fofile="myfile.fo" outfile="myfile.pdf"/>
> > or
> > <fop fofile="myfile.fo" renderer="ps" outfile="myfile.ps"/>
> > 
> > The "renderer" attribute is optional and defaults to "pdf". Possible
> > values currently are: "ps", "mif", "pcl", "txt" and "at" (AreaTree XML).
> > 
> > Attached you find the diff for the Ant Task along with the various
> > updated build.xml files.
> > 
> > By the way: It seems that the xml-docs cannot currently be built. I get
> > an infinite number of ">" after page 20. I didn't investigate any
> > further.
> > 
> > Cheers,
> > Jeremias Märki
> > 
> > mailto:jeremias.maerki@outline.ch
> > 
> > OUTLINE AG
> > Postfach 3954 - Rhynauerstr. 15 - CH-6002 Luzern
> > Fon +41 (41) 317 2020 - Fax +41 (41) 317 2029
> > Internet http://www.outline.ch
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: fop-dev-unsubscribe@xml.apache.org
> For additional commands, email: fop-dev-help@xml.apache.org

Freundliche Grüsse
OUTLINE AG
Jeremias Märki

mailto:jeremias.maerki@outline.ch

Postfach 3954 - Rhynauerstr. 15 - CH-6002 Luzern
Fon +41 (41) 317 2020 - Fax +41 (41) 317 2029
Internet http://www.outline.ch


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


Re: [PATCH] Enhanced FOP Ant Task

Posted by Keiron Liddle <ke...@aftexsw.com>.
Would it be possible/suitable to define the output type using a mime type.
ie. application/pdf
rather than having our own definition.

On Wed, 19 Sep 2001 14:24:41 Jeremias Maerki wrote:
> Hi there
> 
> I've done some tinkering with the FOP Ant Task, that I'd like to submit.
> Currently the FOP task can only generate PDF. I changed it so it can
> use the other renderers as well.
> 
> Old syntax:
> <fop fofile="myfile.fo" pdffile="myfile.pdf"/>
> 
> New syntax:
> <fop fofile="myfile.fo" outfile="myfile.pdf"/>
> or
> <fop fofile="myfile.fo" renderer="ps" outfile="myfile.ps"/>
> 
> The "renderer" attribute is optional and defaults to "pdf". Possible
> values currently are: "ps", "mif", "pcl", "txt" and "at" (AreaTree XML).
> 
> Attached you find the diff for the Ant Task along with the various
> updated build.xml files.
> 
> By the way: It seems that the xml-docs cannot currently be built. I get
> an infinite number of ">" after page 20. I didn't investigate any
> further.
> 
> Cheers,
> Jeremias Märki
> 
> mailto:jeremias.maerki@outline.ch
> 
> OUTLINE AG
> Postfach 3954 - Rhynauerstr. 15 - CH-6002 Luzern
> Fon +41 (41) 317 2020 - Fax +41 (41) 317 2029
> Internet http://www.outline.ch

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