XML to PDF

Another way of converting your XMl using XSL to PDF is using FO ( Formatting
Objects ). Check FOP parser
from APACHE , it has servlets and command line programs that allow you to style
and convert a xml into
PDF . Also Cocoon from Apache does something similar.


FOP is the world's first print formatter driven by XSL formatting objects. It is
 a Java application that reads a
 formatting object tree and then turns it into a PDF document. The formatting
object tree, can be in the form of an
 XML document (output by an XSLT engine like XT or Xalan) or can be passed in
memory as a DOM Document
 or (in the case of XT) SAX events.


Santosh








"Bansal, Monika" <[EMAIL PROTECTED]> on 01/03/2001 03:04:05 PM

Please respond to A mailing list about Java Server Pages specification and
      reference <[EMAIL PROTECTED]>

To:   [EMAIL PROTECTED]
cc:    (bcc: Santosh Daryani/IT/Aon Consulting)

Subject:  FW: Runtime.exec() within servlet



Hi Craig,

Where can I find and buy the package 'JClass Pagelayout' as mentioned in
your earlier post? I need to generate pdf reports from XML using XSL.
How good is this package?

Thanks in advance.

Monika


-----Original Message-----
From: Sullivan, Craig R. [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, January 03, 2001 10:57 AM
To: [EMAIL PROTECTED]
Subject: Runtime.exec() within servlet


Hello,

I am trying to start another JVM within a servlet.  The code is running on a
linux box with the Apache JServ Engine.

Inside my servlet, I have this try block:

------------------------------

 String command = "/usr/local/apache/servlets/startPopulate.sh";

 try {
    Runtime runtime = Runtime.getRuntime();
    runtime.exec(command);
 }
 catch (Exception e) {
    e.printStackTrace(System.out);
    out.println("An error occured while trying to execute the process in " +
                "populateAllCourses()");
 }
-------------------------------

startPopulate.sh is a shell script that contains the following:

---------------------------------
#!/bin/bash
cd /usr/local/apache/servlets
export CLASSPATH=.:$CLASSPATH
java PopulateCourses [EMAIL PROTECTED] > /tmp/dump.txt
----------------------------------

This shell script runs fine if I start it from the command line, but only
creates an empty "/tmp/dump.txt" file when started from the servlet.
"PopulateCourses" is a class that has rwx permission for everyone.  I need
to run the PopulateCourses class within its own process, because it takes
about an hour to complete.  Once the process is started, the servlet tells
the user that they will be e-mailed after PopulateCourses is complete.

Anyone see what I'm doing wrong?

Thanks,
Craig Sullivan


-----Original Message-----
From: Pradeep Shekade [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, January 03, 2001 9:15 AM
To: [EMAIL PROTECTED]
Subject: Re: How to produce Reports


Hi,

I too was involved with this problem. You can write a
servlet to create reports. You can convert the report
in html form or pdf.

There is this package called as JClass Pagelayout
available which will allow you to create reports. This
package uses XML/XSL to create pdfs. If you do not
want to buy this package you can write classes to
create the pdfs (I have used only the JClass package).
If u want to write ur own classes you would have to
use XSLFO.

I hope this answers ur query.

___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".

Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html

===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST".
Some relevant FAQs on JSP/Servlets can be found at:

 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets

===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST".
Some relevant FAQs on JSP/Servlets can be found at:

 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets

Reply via email to