Win a copy of Murach's Python Programming this week in the Jython/Python forum!
    Bookmark Topic Watch Topic
  • New Topic

PDF in a separate window  RSS feed

 
Madhavan Santhanam
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
  • Report post to moderator
Hi,
The problem is, My pdf document is getting opened in the same browser where my application is present. So after viewing the PDF i cant go back to the application.I have to once again open a new browser. To avoid this problem, I went to the Acrobat,Edit->Preference, Internet tab-> and unchecked the option "Display pdf in browser".It works. But i don't wanna do like this. I want my PDF to get opened in a separate window. But i don't know how to do it. Can any1 help me?. Its urgent..Thanks a lot!!!



response.setContentType("application/pdf");
response.setHeader("Content-Disposition","inline;filename"\""+doc.getName()+".pdf"+"\"");
ByteArrayInputStream pdfStream = new ByteArrayInputStream(contentArray);
.......
.......
.......
[ January 11, 2008: Message edited by: Bear Bibeault ]
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 65826
134
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Report post to moderator
Please read this.
 
Madhavan Santhanam
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
  • Report post to moderator
Thanks for the post.I ll make sure that I wont use the word "urgent" in the future...
 
William Brogden
Author and all-around good cowpoke
Rancher
Posts: 13078
6
  • Mark post as helpful
  • send pies
  • Report post to moderator
I want my PDF to get opened in a separate window.


This is an HTML problem, not a servlet problem. In the <A link to the pdf you can use the TARGET attribute to control where the content is opened. See any good HTML reference for details.

Bill
 
Consider Paul's rocket mass heater.
    Bookmark Topic Watch Topic
  • New Topic
Boost this thread!