You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-users@xmlgraphics.apache.org by mastern <ma...@kofax.com> on 2012/11/08 18:02:44 UTC

Suppressing page indicators in log file with FOP 1.1

We're upgrading to FOP 1.1. A new feature I've found is that in the log file,
it lists the pages as they are rendered like this:

[fop] INFO: Rendered page #14.
[fop] Oct 25, 2012 8:14:25 PM org.apache.fop.events.LoggingEventListener
processEvent

The problem is that at some of our development sites, documentation builds
are included with product builds. This can affect build times. One of our
writers says that new messages "will take [our builds] about 10-15 minutes
longer and the log file is much bigger (~ 800 lines of code)."

Is there a way to configure FOP to suppress these messages? Thanks in
advance for your help.

Matthew Stern
Sr. Principal Technical Writer
Kofax, Inc.




--
View this message in context: http://apache-fop.1065347.n5.nabble.com/Suppressing-page-indicators-in-log-file-with-FOP-1-1-tp37295.html
Sent from the FOP - Users mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org


Re: Suppressing page indicators in log file with FOP 1.1

Posted by mastern <ma...@kofax.com>.
Thank you, Stefan. We use ANT to run FOP. Here is the part of build.xml that
executes FOP:


    <target name="transform.fo2pdf.fop" if="use.fop.pdf.formatter">
        <taskdef name="fop" classname="org.apache.fop.tools.anttasks.Fop">
            <classpath>
                <fileset dir="${fop.home}/lib">
                    
                    <include name="*.jar"/>
                </fileset>
                <fileset dir="${fop.home}/build">
                    <include name="fop.jar"/>
                    
                </fileset>
            </classpath>
        </taskdef>

        <fop format="application/pdf" fofile="${inputFile}"
basedir="${dita.map.output.dir}" outfile="${outputFile}"
messagelevel="verbose"
            userconfig="${fop.home}/conf/fop.xconf"/>
        
    </target>

How would we declare FOP_OPTS in this script? We will generate Arabic text,
so we will need complex scripts. It will be helpful to set -nocs if
project.locale does not contain ar. If anyone has suggestions on doing this,
please let me know.

Thanks,
Matthew Stern 
Sr. Principal Technical Writer 
Kofax, Inc. 



--
View this message in context: http://apache-fop.1065347.n5.nabble.com/Suppressing-page-indicators-in-log-file-with-FOP-1-1-tp37295p37327.html
Sent from the FOP - Users mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org


Re: Suppressing page indicators in log file with FOP 1.1

Posted by Stefan Hinz <st...@oracle.com>.
Hi Matthew,

> We're upgrading to FOP 1.1. A new feature I've found is that in the log file,
> it lists the pages as they are rendered like this:
>
> [fop] INFO: Rendered page #14.
> [fop] Oct 25, 2012 8:14:25 PM org.apache.fop.events.LoggingEventListener
> processEvent
>
> The problem is that at some of our development sites, documentation builds
> are included with product builds. This can affect build times. One of our
> writers says that new messages "will take [our builds] about 10-15 minutes
> longer and the log file is much bigger (~ 800 lines of code)."
>
> Is there a way to configure FOP to suppress these messages? Thanks in
> advance for your help.

Try "fop --help" to see the options. "fop -q" runs FOP in quiet mode.

BTW, I don't think it's the line number output that slows down FOP. 
Through testing, I found that FOP 1.1 runs faster by factors with these 
settings, which you'd normally want to put in a wrapper script that 
calls FOP (e.g. /usr/bin/fop or fop.bat). I've installed multiple FOP 
versions here, that's why I've called the script "fop1":

atlas/usr/bin # cat fop1
#!/bin/sh
export FOP_OPTS=-Xmx4096m
exec /usr/bin/fop -nocs "$@"

Via FOP_OPTS, I'm setting the memory FOP may consume to 4 GB. I'm doing 
this because I can afford it :-), and because it guarantees FOP won't 
come to a grinding halt even with super large documents (I'm building 
PDF here with more than 3 million words and more than 2500 pages). On 
our documentation server, we found 3 GB is enough for any of our PDF 
builds. My rule of thumb, probably wrong, but works for me: Give FOP 1 
GB of memory per 1 million words in the document you're processing.

Specifying the "-nocs" option when calling FOP saves a lot of overhead. 
You should specify it if you're not building PDF for Arabic or similar 
languages ("nocs" stands for "no complex scripts").

More memory, plus cutting overhead with "nocs", will make run FOP 1.1 
blazingly fast. I've never seen a FOP version that would produce PDF at 
such a speed.

-- 
Cheers,

Stefan Hinz <st...@oracle.com>, MySQL Documentation Manager

Phone: +49-30-82702940, Fax: +49-30-82702941, http://dev.mysql.com/doc

ORACLE Deutschland B.V.&  Co. KG
Registered Office: Riesstr. 25, 80992 Muenchen, Germany
Commercial Register: Local Court Of Munich, HRA 95603
Managing Director: Jürgen Kunz

General Partner: ORACLE Deutschland Verwaltung B.V.
Hertogswetering 163/167, 3543 AS Utrecht, Niederlande
Register Of Chamber Of Commerce: Midden-Niederlande, No. 30143697
Managing Directors: Alexander van der Ven, Astrid Kepper, Val Maher

---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org