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

cannot name inline pdf file...  RSS feed

 
Samuel Cox
Ranch Hand
Posts: 96
Scala Ubuntu VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This outputs the pdf in a browser window; however, it doesn't seem to use the filename I supply. I thought the addHeader method would set the filename to test.pdf, but it doesn't seem to work.



Any help is greatly appreciated.
 
Jeanne Boyarsky
author & internet detective
Sheriff
Posts: 36406
454
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Samuel.
That filename is used as a default when a user downloads the PDF. When shown in a browser, the filename is not needed.
 
Samuel Cox
Ranch Hand
Posts: 96
Scala Ubuntu VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Jeanne,

Yes, but our users want to be able to click email from adobe acrobat in order to include the pdf as an attachment. Therefore, I need the filename to be correct so the recipient of the email doesn't have to rename the file.
 
Samuel Cox
Ranch Hand
Posts: 96
Scala Ubuntu VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Figured I'd give this one more chance.

Anyone know a solution to this problem?
 
Jeroen Wenting
Ranch Hand
Posts: 5093
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
the short and simple: you can't, not that way.
What MIGHT work is create a mapping to the servlet that generates the pdf (doing what you're doing should not be done in a jsp) and name that /servlet/something.pdf for example. Whether acrobat reader actually picks up that name I've not tried, it may not work in which case there's no way in hell you're going to get it to work.
 
Don't get me started about those stupid light bulbs.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!