Another possibility for creating the PDF is to use 3rd party Html-to-Pdf
translators.  They can be called from a Runtime.exec( ) call.  It's kind of
awkward to hook them to your servlets, but you can use the same code that
created the Html content for the report.  And they include support for
pagination, headers, and footers, which is the biggest problem with Html
printing.

Try these:

http://www.tdb.uu.se/~jan/html2ps.html
<http://www.tdb.uu.se/~jan/html2ps.html>   - converts html to postscript.
You'll need another product to do the postscript to pdf conversion.  Try
Acrobat Distiller from Adobe or Ghostscript may have a free one.  This is a
perl product and it's free under the GNU license.

http://www.easysw.com/~mike/htmldoc <http://www.easysw.com/~mike/htmldoc>
converts directly from html to pdf.  I believe this is free as well.

I know that Adobe Acrobat4.0 has support for html to pdf too, but I don't
know much about it, or if you can call it directly from Java without some
native code support.  It might only be available for NT right now.

Zol Heyman

                -----Original Message-----
                From:   S.Ramaswamy [mailto:[EMAIL PROTECTED]]
                Sent:   Wednesday, May 12, 1999 3:49 AM
                To:     [EMAIL PROTECTED]
                Subject:        Re: Printing from a servlet

                >      Is it possible to obtain information about a client's
printer setup
                >      from the browser that a servlet is running in and
then create a method
                >      and button that will actually print to that printer
from a servlet.
                >
                >      In other words, I would like to have a button in my
servlet that once
                >      pressed will print the current page on the client's
printer...
                >
                >      Is it possible?

                One option you  can try is to create PDF output from your
servlet and then send
                it to the browser. Two PDF API that I know of are available

                1)  http://www.retep.org.uk/pdf/
                2) http://www.etymon.com

                A report writer  available that does this

                http://www.inetsoftcorp.com/

___________________________________________________________________________
                S.Ramaswamy
                Matrix Infotech Syndicate
                D-7, Poorti, Vikaspuri, New Delhi, 110018, India
                PHONE: +91-11-5610050,   FAX: +91-11-5535103
                WEB  :   http://MatrixInfotech.HyperMart.Net


___________________________________________________________________________
                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, 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

Reply via email to