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 "Xie, David (IPCG-NJ)" <xi...@exchange.ml.com> on 2002/03/04 19:52:57 UTC

FOPException / Quiet Mode / error compliing servlets

Thanks Jay and Jeremias for your help.  I need to convince people from work that FOP is our PDF solution.  However, without a good scalability test result (100% job completion rate), I am having
trouble doing so.  

I truely believe that one of the main reason for out of memory error is because FOP is running in debug mode, where you see every page gets generated (ex: page 1,2 [1][2]).  Most of the memory is used
by java to write debug information such as pages complete, initial and final heap size.. etc on to window's console.  If I can turn this off and run FOP in quiet mode, I am guessing the performance
would increase by at least 30% and scability will also improve.  

Jeremias, you sugguest to me to change edit the logger (http://xml.apache.org/fop/embedding.html).  how do I edit the code?  Do I need to get Avalon?

Jay, you mentioned that I might have to edit the FOP source code.  Do you know which java file I should edit so I can turn off the log screen?  Also, I am having trouble compling servlets.  Following
is the error message, can you tell me where I can get the SAX servlet package?  

thanks again for everyone's help.

David


Error message while compiling servlet:

C:\Archive\SSSS\FOPService1\org\apache\fop\tools\servlet>javac FOPService1.java
FOPService1.java:6: cannot resolve symbol
symbol  : class XMLReader
location: package sax
import org.xml.sax.XMLReader;
                   ^
FOPService1.java:7: cannot resolve symbol
symbol  : class InputSource
location: package sax
import org.xml.sax.InputSource;
                   ^
FOPService1.java:8: package org.apache.fop.apps does not exist
import org.apache.fop.apps.*;
^
FOPService1.java:9: package org.apache.fop.tools.xslt does not exist
import org.apache.fop.tools.xslt.*;
^
FOPService1.java:155: cannot resolve symbol
symbol  : class InputSource
location: class org.apache.fop.tools.servlet.FOPService1
       InputSource is =new InputSource(foFile);
       ^
FOPService1.java:155: cannot resolve symbol
symbol  : class InputSource
location: class org.apache.fop.tools.servlet.FOPService1
       InputSource is =new InputSource(foFile);
                           ^
FOPService1.java:157: cannot resolve symbol
symbol  : class Driver
location: class org.apache.fop.tools.servlet.FOPService1
       Driver driver=null;
       ^
FOPService1.java:161: cannot resolve symbol
symbol  : class Driver
location: class org.apache.fop.tools.servlet.FOPService1
            driver = new Driver(is, out);
                         ^
8 errors

    


Re: FOPException / Quiet Mode / error compliing servlets

Posted by Jeremias Maerki <je...@outline.ch>.
> Thanks Jay and Jeremias for your help.  I need to convince people from work that FOP is our PDF solution.  However, without a good scalability test result (100% job completion rate), I am having
> trouble doing so.  
> 
> I truely believe that one of the main reason for out of memory error is because FOP is running in debug mode, where you see every page gets generated (ex: page 1,2 [1][2]).  Most of the memory is used
> by java to write debug information such as pages complete, initial and final heap size.. etc on to window's console.  If I can turn this off and run FOP in quiet mode, I am guessing the performance
> would increase by at least 30% and scability will also improve.  
> 
> Jeremias, you sugguest to me to change edit the logger (http://xml.apache.org/fop/embedding.html).  how do I edit the code?  Do I need to get Avalon?

Using a text editor. :-) Seriously, I guess you're using the fop.war in
docs/examples/embedding, right? The source code is in FopServlet.java.
Unfortunately, the WAR file is not built with the build script, so you
have to manually build the WAR file after adjusting the code. Actually,
it's not even necessary to build the WAR. It is sufficient to compile
FopServlet.java (you need to get servlet.jar from your web container to
do that) and place it (along with a web.xml file) in the right places.

And you don't need to get Avalon, since the necessary jars are in the
lib directory of FOP's distribution.

> Jay, you mentioned that I might have to edit the FOP source code.  Do you know which java file I should edit so I can turn off the log screen?  Also, I am having trouble compling servlets.  Following
> is the error message, can you tell me where I can get the SAX servlet package?

SAX has nothing to do with servlets. The SAX stuff is in xerces.jar. You
can get the servlet.jar from your web container or from here: 
http://java.sun.com/products/servlet/

To turn of logging you can also try to call
MessageHandler.setOutputMethod(MessageHandler.NONE);

Cheers,
Jeremias Märki

mailto:jeremias.maerki@outline.ch

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


Re: watermarking

Posted by Guillaume Laforge <gl...@reflexe.fr>.
I've heard some people using FOP for generating PDFs, then using iText afterwards to add watermarking to their dynamically FOP-generated PDFs. But I havent tested it myself.

Good luck.

Guillaume
  ----- Original Message ----- 
  From: Chris Faulkner 
  To: fop-user@xml.apache.org 
  Sent: Tuesday, March 05, 2002 10:44 AM
  Subject: watermarking


  hello all

  Is there any way of adding some kind of watermark to a PDF document generated with FOP ? I am using FOP in a JSP environment.

  Thanks

  Chris




watermarking

Posted by Chris Faulkner <ch...@ntlworld.com>.
hello all

Is there any way of adding some kind of watermark to a PDF document generated with FOP ? I am using FOP in a JSP environment.

Thanks

Chris