Re: FOP inside Tomcat 5

2005-03-01 Thread jeb501
Hi all ,

I am conversant with using FOP from DOS mode,

How to use it or to start using it with servlet.

any help greatly appreciated

Regards
Eugene




[EMAIL PROTECTED] 
01.03.2005 16:23
Please respond to
[EMAIL PROTECTED]


To
[EMAIL PROTECTED]
cc

Subject
FOP inside Tomcat 5







Hello List

I Use FOP to generate a PDF File from a SVG Grafik

When I Use the Servlet Code from a Standalone Appication everything woks
fine.

But when the Code is called from the Servlet Container (Tomcat) I got this
strange Error

java.lang.NoSuchMethodError:
org.apache.batik.bridge.UnitProcessor.createContext(Lorg/apache/batik/bridge/BridgeContext;Lorg/w3c/dom/Element;)Lorg/apache/batik/util/UnitProcessor$Context;

 org.apache.fop.image.analyser.SVGReader.loadImage(SVGReader.java:107)
 
org.apache.fop.image.analyser.SVGReader.verifySignature(SVGReader.java:85)
 
org.apache.fop.image.analyser.ImageReaderFactory.Make(ImageReaderFactory.java:129)
  org.apache.fop.image.FopImageFactory.Make(FopImageFactory.java:181)
 org.apache.fop.fo.flow.ExternalGraphic.layout(ExternalGraphic.java:188)
  org.apache.fop.fo.flow.AbstractFlow.layout(AbstractFlow.java:154)
  org.apache.fop.fo.flow.AbstractFlow.layout(AbstractFlow.java:110)
 org.apache.fop.fo.pagination.PageSequence.makePage(PageSequence.java:400)
 org.apache.fop.fo.pagination.PageSequence.format(PageSequence.java:338)
  org.apache.fop.apps.StreamRenderer.render(StreamRenderer.java:262)
  org.apache.fop.fo.FOTreeBuilder.endElement(FOTreeBuilder.java:223)
  org.apache.xerces.parsers.AbstractSAXParser.endElement(Unknown 
Source)
 org.apache.xerces.impl.dtd.XMLNSDTDValidator.endNamespaceScope(Unknown 
Source)
  org.apache.xerces.impl.dtd.XMLDTDValidator.handleEndElement(Unknown 
Source)
  org.apache.xerces.impl.dtd.XMLDTDValidator.endElement(Unknown 
Source)
 org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanEndElement(Unknown 
Source)
 
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown
 
Source)
 
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown 
Source)
  org.apache.xerces.parsers.DTDConfiguration.parse(Unknown Source)
  org.apache.xerces.parsers.DTDConfiguration.parse(Unknown Source)
  org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
  org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
  org.apache.fop.apps.Driver.render(Driver.java:498)
  org.apache.fop.apps.Driver.run(Driver.java:565)
  schedule.FOPrintRenderer.render(FOPrintRenderer.java:36)
  servlets.BauplanAction.doGet(BauplanAction.java:195)
  javax.servlet.http.HttpServlet.service(HttpServlet.java:697)
  javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
  kampf.filter.NtlmHttpFilter.doFilter(NtlmHttpFilter.java:212)

I think it could be a correlation with Sax Parser implementation and 
Tomcat ?

I'm very happy If someone can help me

Best Regards Joern






-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



sample codes

2005-02-14 Thread jeb501
Hi All,

Where can I find sample codes for creating Invoice like forms using XSL-FO

Regards
Eugene

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Improving FOP Performance?

2005-02-12 Thread jeb501
Hi Ram,

Please post the codes / send me the sample code files (.fo,.xsl)
for us to study..

Thanks
Eugene



Ram Krishnamoorthi [EMAIL PROTECTED] 
11.02.2005 20:36
Please respond to
[EMAIL PROTECTED]


To
[EMAIL PROTECTED]
cc

Subject
Improving FOP Performance?






Hello,
We are using FOP to convert to generate PDF Invoices
for our Customers. We need to generate roughly around
25,000 Invoices Per Month and the Number would
increase each Month. We generate PDF Docs from XML
Input Files. We had Trial runs to check for
Performance and Memory usage.
Currently, We are just invoking FOP command directly
from a Shell Script which would call the FOP Command
repeatedly but making sure that not more than 2 (or
sometimes 3) FOP Processes are running at any instant.


I would like to have your opinion on the Performance
that we observe here. The Test Machine we run FOP on
has 2 CPUs and 4 GB RAM. Our Production Machine that
we would be running FOP on soon has 4 CPUs though

(1) In our case, An Invoice could have Several
Individual Sections. The Number of Sections could vary
from 10 to as high as 10,000 (depending on the data
present in the XML Input). On an Average, an Invoice
is around 10-20 Pages..while a small % of them exceed
500 Pages. Currently, We have a Page Sequence for 
each Section. We need to include only One Small Image
in each Invoice.

(2) There is a need to keep certain information
together in the same page, so I have used Tables
often..on an Average an Invoice could have around
50-60 Tables, But the Tables are not big (2 or 3 rows)
and have only one or 2 columns utmost. I do understand
Tables take up more memory..do they Impact Performance
significantly?

(3) I am using xsl:for-each in 3-4 places in the
Stylesheet to loop through nodes with same Tag instead
of using 'Template Match'..does that matter? 

At this Point, I see about 30,000 Pages being
generated in an Hour if I run 2 threads. I have not
embedded FOP in a Java Program Yet..Plan to do that..I
have seen 1 or 2 messages mentioning that Caching a
Stylesheet would help. Can someone share their
experience by doing that?

Are their other means to Improve Performance? 

Thanks for your assistance
Ram
 




 
__ 
Do you Yahoo!? 
Yahoo! Mail - Helps protect you from nasty viruses. 
http://promotions.yahoo.com/new_mail

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Column Width

2005-02-11 Thread jeb501
Hi All,

If I use the below code, I am getting 2 columns of equal width, and if 
want to get 

unequal columns, what should I have to do..
 
fo:region-body
margin-top=1in margin-bottom=1in
column-count=2 column-gap=0.25in/

Any reply greatly appreciated.

Regards
Eugene


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Column Width

2005-02-11 Thread jeb501
I also have that idea in back of my mind,  but I thought region-body will 
be

flexible,

Thanks for the immediate response.

Eugene



Arun Sinha [EMAIL PROTECTED] 
11.02.2005 09:57
Please respond to
[EMAIL PROTECTED]


To
[EMAIL PROTECTED]
cc

Subject
RE: Column Width






Hi,

Alternatively you can use tables rather than column in region-body.

You will have greater options with tables.

I always use tables.

Cheers.

Arun


From: [EMAIL PROTECTED]
Reply-To: [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Subject: Column Width
Date: Fri, 11 Feb 2005 08:10:06 +0530

Hi All,

If I use the below code, I am getting 2 columns of equal width, and if
want to get

unequal columns, what should I have to do..

fo:region-body
 margin-top=1in margin-bottom=1in
 column-count=2 column-gap=0.25in/

Any reply greatly appreciated.

Regards
Eugene


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


_
Try the all-new MSN Search! Find exactly what you want. 
http://search.msn.co.in Get more value for your time.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Outline

2005-02-11 Thread jeb501
Hi All,

What is code/tag to be used to draw a border or outline on the page

Regards
Eugene

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Outline

2005-02-11 Thread jeb501
Please post a sample script, I do not where to include these attributes.
ie whether to include inside fo:table 



Arun Sinha [EMAIL PROTECTED] 
11.02.2005 12:08
Please respond to
[EMAIL PROTECTED]


To
[EMAIL PROTECTED]
cc

Subject
RE: Outline







Hi

Its border-top-style, border-left-style, border-bottom-style and 
border-right-style.

Hope the above helps.

Cheers.

Arun

From: [EMAIL PROTECTED]
Reply-To: [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Subject: Outline
Date: Fri, 11 Feb 2005 09:55:44 +0530

Hi All,

What is code/tag to be used to draw a border or outline on the page

Regards
Eugene

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


_
The MS Office product suite. Make efficiency a habit. 
http://www.microsoft.com/india/office/experience/  Simplify your life.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: totally new to FOP -Please help me

2005-02-07 Thread jeb501
Please refer to documents in your

D:\fop-0.20.5\build\site\running.html

the command line args  are

fop -fo input.fo -pdf output.pdf

here input.fo is your input file and output.pdf is your output file

hope this clarifies you.

Cheers
Eugene



Manisha Sathe [EMAIL PROTECTED] 
07.02.2005 11:50
Please respond to
[EMAIL PROTECTED]


To
[EMAIL PROTECTED]
cc

Subject
Re: totally new to FOP -Please help me






hi all,
 
1) no 5 i could sort it out - some silly mistake in my classpath settings. 
 but no 4 is as it is
 
regards
Manisha

Manisha Sathe [EMAIL PROTECTED] wrote:
I am very new to fop - just started learning it. 
 
1)I downloaded the fop - 0.20.5 - binary version for windows (.zip)
2)Unzipped it (D:\fop-0.20.5)
3)Trying to run D:\fop-0.20.5\fop.bat - i get o/p as mentioned in the 
document
http://apache.oss.eznetsols.org/xml/fop/
4)but at the end of it i got error -
 
[ERROR] No Input file specified
 
What's missing ? JAVA_HOME is set properly. 
 
5)I also tried to compile one servlet (which i got it from web) - i put 
inside the classpath fop.jar and all other jars those inside fop.bat. But 
i am getting errors
--
import org.apache.fop.apps.Driver;
import org.apache.fop.apps.XSLTInputHandler;
import org.apache.fop.render.Renderer;
import org.apache.avalon.framework.logger.Logger;
import org.apache.avalon.framework.logger.ConsoleLogger;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.ServletException;
import javax.servlet.ServletOutputStream;
import javax.xml.transform.stream.StreamSource;
import javax.xml.transform.Transformer;
import javax.xml.transform.TransformerFactory;
import java.io.IOException;
import java.io.ByteArrayOutputStream;
import java.util.logging.Level;

public class FOPServlet extends HttpServlet
{
private String xmlFile = data.xml;
private String xslFile = pdfGen.xsl;
protected void doGet(HttpServletRequest httpServletRequest, 
HttpServletResponse
httpServletResponse) throws ServletException, IOException
{
// set up a FOP driver
Driver driver = new Driver();
// set up the logger for the driver
Logger logger = new ConsoleLogger(ConsoleLogger.LEVEL_INFO);
driver.setLogger(logger);
try
{
//set the renderer to be PDF
driver.setRenderer(Driver.RENDER_PDF);
//create the input from the XSLT transform
XSLTInputHandler inputHandler = new XSLTInputHandler(xmlFile, 
xslFile);
// now prepare the outputStrean
ByteArrayOutputStream outStream = new ByteArrayOutputStream();
//set the driver outputStream
driver.setOutputStream(outStream);
//do the XSLT
driver.render(inputHandler.getParser(), 
inputHandler.getInputSource());
//now that the content is written in the output stream,
//get ready to send the response back to browser
byte[] content = outStream.toByteArray();
httpServletResponse.setContentLength(content.length);
// set the MIME-TYPE
httpServletResponse.setContentType(application/pdf);
//write the content
httpServletResponse.getOutputStream().write(content);
httpServletResponse.getOutputStream().flush();
} catch (Exception e)
{
e.printStackTrace();
}
}
}

 
I am getting following:
 
D:\jakarta-tomcat-5.0.25\webapps\rr_lesson_1\WEB-INF\classes\FOPServlet.java:1: 
package org.apache.fop.apps does not exist
import org.apache.fop.apps.Driver;
   ^
D:\jakarta-tomcat-5.0.25\webapps\rr_lesson_1\WEB-INF\classes\FOPServlet.java:2: 
package org.apache.fop.apps does not exist
import org.apache.fop.apps.XSLTInputHandler;
   ^
D:\jakarta-tomcat-5.0.25\webapps\rr_lesson_1\WEB-INF\classes\FOPServlet.java:3: 
package org.apache.fop.render does not exist
import org.apache.fop.render.Renderer;
 ^
D:\jakarta-tomcat-5.0.25\webapps\rr_lesson_1\WEB-INF\classes\FOPServlet.java:4: 
package org.apache.avalon.framework.logger does not exist
import org.apache.avalon.framework.logger.Logger;
  ^
D:\jakarta-tomcat-5.0.25\webapps\rr_lesson_1\WEB-INF\classes\FOPServlet.java:5: 
package org.apache.avalon.framework.logger does not exist
import org.apache.avalon.framework.logger.ConsoleLogger;
  ^
 
Please can anybody give me clue about it ? What am i doing wrong ?
 
regards
Manisha
 
 
 
Do you Yahoo!?
Meet the all-new My Yahoo!  Try it today! 
Do you Yahoo!?
Read only the mail you want - Yahoo! Mail SpamGuard.



Out of environment space

2005-01-31 Thread jeb501
I have pasted part of execution of codes and errors below while running 
FOP.

can anybody help me to get it sorted out.

Thanks
Eugene

C:\fop-0.20.5set 
LOCALCLASSPATH=C:\FOP-02~1.5build\fop.jar;C:\FOP-02~1.5lib\xml
-apis.jar;C:\FOP-02~1.5lib\avalon-framework-cvs-20020806.jar
Out of environment space

C:\fop-0.20.5set 
LOCALCLASSPATH=C:\FOP-02~1.5build\fop.jar;C:\FOP-02~1.5lib\xml
-apis.jar;C:\FOP-02~1.5lib\jimi-1.0.jar
Out of environment space

C:\fop-0.20.5set 
LOCALCLASSPATH=C:\FOP-02~1.5build\fop.jar;C:\FOP-02~1.5lib\xml
-apis.jar;C:\FOP-02~1.5lib\jai_core.jar
Out of environment space



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Out of environment space

2005-01-28 Thread jeb501
If I run the FOP batch file, I get the below error. Please help me sort it 
out.

Out of environment space , while settling local class path in the batch 
file.

My system config is win98/256mb RAM.

Thanks
Eugene

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]