File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Servlets and the fly likes Sending pdf file to user Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Java » Servlets
Reply Bookmark "Sending pdf file to user" Watch "Sending pdf file to user" New topic
Author

Sending pdf file to user

Prakash Dwivedi
Ranch Hand

Joined: Sep 28, 2002
Posts: 452
Hello,
I have to generate a pdf file in runtime and show dialog box so that user can download it and redirect the page to some jsp.
While i am able to create a pdf file but i am confused how to send it
to the user.I am using struts framework.
I tried useing response.getOutputStream(). but in that case i got some useless characters printed on the browser
Any sugeestions?
thanks


Prakash Dwivedi (SCJP2, SCWCD, SCBCD)
"Failure is not when you fall down, Its only when you don't get up again"
Matthew Phillips
Ranch Hand

Joined: Mar 09, 2001
Posts: 2676
Try setting your content type to application/pdf.


Matthew Phillips
 
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: Sending pdf file to user
 
Similar Threads
Using Thumbnail PDFs
Saving a PDF automatically
Response as PDF
iReport Question
Printing Report in Struts2