This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Servlets and the fly likes Open pdf file Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "Open pdf file" Watch "Open pdf file" New topic
Author

Open pdf file

David Dhune
Greenhorn

Joined: Sep 28, 2006
Posts: 14
After clicking the link on the file name on jsp, the control goes back to servlet, the servlet authenticated the user and its role, then opens the pdf file. Can anybody help me, how to open the pdf file in adobe reader and after closing the adobe reader the control goes back to the jsp where link was clicked. Thanks David.
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 41155
    
  45
The web app can't control which application is used to open the file on the client. It just provides the MIME type, and then the user gets to choose the application. For PDFs, most often that will be Acrobat, but it could also be something like Preview (on OS X). If the file has features only Acrobat supports (like filling in forms), you should mention that next to the download link.

You can't control what happens after the viewing app is closed. The user may have switched to other applications in the mean time anyway, and will get back to the web app when it's convenient to her. What is the purpose of wanting to control this?


Ping & DNS - my free Android networking tools app
Bauke Scholtz
Ranch Hand

Joined: Oct 08, 2006
Posts: 2458
Open the link in a new window.
David Dhune
Greenhorn

Joined: Sep 28, 2006
Posts: 14
It was decided that to open the pdf in new window and no control constriants. Thanks for the inputs. David
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Open pdf file
 
Similar Threads
PDF and HTML
Jasper pdf in a new window and checkbox option in the pdf
PDF file and JSP
Error in opening pdf through jsp
Problem in Downloading PDF File using JSP