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 Mikael St�ldal <d9...@d.kth.se> on 2000/08/17 23:31:01 UTC

Output to standard out

Is it possible to stop FOP from writing progress information to
standard out (System.out)? I find it quite annoying.

-- 
/****************************************************************\
* You have just read a message from Mikael Ståldal.              *
*                                                                *
* Remove "-ingen-reklam" from the address before mail replying.  *
\****************************************************************/

Re: Output to standard out

Posted by Mikael St�ldal <d9...@d.kth.se>.
In article <39...@localhost>,
"Fotis Jannidis" <fo...@lrz.uni-muenchen.de> wrote:

>Just add at the beginning of your version of CommandLine or 
>whatever you use: 
>MessageHandler.setOutputMethod(MessageHandler.NONE);
>
>(you have to import org.apache.fop.messaging)

It doesn't help. Here is my code:

import java.io.*;

import org.xml.sax.*;
import org.apache.fop.apps.*;
import org.apache.xerces.parsers.*;

public class FOPandSAX2
{
    public static void main(String[] args) throws Exception
    {
		org.apache.fop.messaging.MessageHandler.setOutputMethod(
			org.apache.fop.messaging.MessageHandler.NONE);

		Driver driver = new Driver();
		driver.setRenderer("org.apache.fop.render.pdf.PDFRenderer", 
						   Version.getVersion());
		driver.addElementMapping("org.apache.fop.fo.StandardElementMapping");
		driver.addElementMapping("org.apache.fop.svg.SVGElementMapping");

		driver.addPropertyList(
       		"org.apache.fop.fo.StandardPropertyListMapping");

		driver.addPropertyList(
			"org.apache.fop.svg.SVGPropertyListMapping");

		driver.setWriter(new PrintWriter(new FileWriter(args[1])));

		XMLReader parser = new SAXParser();

        // workaround for the SAX2 bug in FOP 0.14.0
        parser.setFeature("http://xml.org/sax/features/namespace-prefixes",
        	true);

		parser.setContentHandler(driver.getContentHandler());
		parser.parse(new InputSource(args[0]));

		driver.format();
    	driver.render();
	}

}

-- 
/****************************************************************\
* You have just read a message from Mikael Ståldal.              *
*                                                                *
* Remove "-ingen-reklam" from the address before mail replying.  *
\****************************************************************/

Re: Output to standard out

Posted by Fotis Jannidis <fo...@lrz.uni-muenchen.de>.
Just add at the beginning of your version of CommandLine or 
whatever you use: 
MessageHandler.setOutputMethod(MessageHandler.NONE);

(you have to import org.apache.fop.messaging)

Fotis



Send reply to:  	fop-dev@xml.apache.org
From:           	d96-mst-ingen-reklam@d.kth.se (Mikael St?ldal)
To:             	fop-dev@xml.apache.org
Subject:        	Output to standard out
Date sent:      	Thu, 17 Aug 2000 22:31:01 +0100
Organization:   	Royal Institute of Technology

> Is it possible to stop FOP from writing progress information to
> standard out (System.out)? I find it quite annoying.
> 
> -- 
> /****************************************************************\
> * You have just read a message from Mikael Ståldal.              *
> *                                                                *
> * Remove "-ingen-reklam" from the address before mail replying.  *
> \****************************************************************/