Is it possible for your application to launch a web browser?  If possible
you could point to the servlet/jsp, and give it a content-type of
application/pdf like so:

ServletOutputStream outs = response.getOutputStream();
response.setContentType("application/pdf");
PdfWriter writer = PdfWriter.getInstance(document, outs);
...


-----Original Message-----
From: Rajendran S [mailto:[EMAIL PROTECTED]]
Sent: 15 March 2002 20:50
To: [EMAIL PROTECTED]
Subject: [iText-questions] downloading pdf file from servlet and
printing


For one of my client-server applications, I need to serve the pdf document 
from the servlet both for viewing and printing. As far as rendering to the 
requested browser , there is no problem. But for printing, we have to send 
the document to client's printer. To do this I was thinking whether we can 
do the following:

1. I will have a java program that will send the http request for generating

PDF.
2. Java servlets will generate the PDF document and return the pdf to the 
calling client program instead of displaying it in the browser.
3. From the client java program , I will initiate a process that launches 
Acrobat reader to print this document with a /p command that will display 
the printer list and allow the docuemnt to be printed upon selecting the 
local printer.

If this is the right way to do it, can someone help me in getting the java 
sample code to do this?
Thanks




_________________________________________________________________
Join the world's largest e-mail service with MSN Hotmail. 
http://www.hotmail.com


_______________________________________________
iText-questions mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/itext-questions

_______________________________________________
iText-questions mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/itext-questions

Reply via email to