• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Problem in Downloading PDF link in HTML

 
Ranch Hand
Posts: 42
1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Guys

Today I was working on creating PDF. I created PDF Successfully. After that I try to download it. It was not asking for Save or open option in pop-up. It is directly opening in new tab of browser.
But I want to download it.

This link is like this

<a href="avc.pdf">PDF</a>

Please help me guys.

Thanks in Advance
 
author
Posts: 15385
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Your browser is set up to open the pdfs up in the browser.

You can configure your server to force the save dialog: http://www.thingy-ma-jig.co.uk/blog/06-08-2007/force-a-pdf-to-download


Eric
 
Vishal Baid
Ranch Hand
Posts: 42
1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Do we have any other way ?
i don't want to change in setting of server.
If we can We change in code.

Please help me on this.
Thanks
 
Ranch Hand
Posts: 296
Eclipse IDE Firefox Browser Tomcat Server
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You need to let the servlet set the "Content-Disposition" header to "attachment"
 
Vishal Baid
Ranch Hand
Posts: 42
1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
How can I do this in XSL-FO ?
For creating and designing PDF We are using XSL-FO.
 
Sumit Patil
Ranch Hand
Posts: 296
Eclipse IDE Firefox Browser Tomcat Server
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have not used XSL-FO. The above statement was if you were using some servlet to render the pdf file. The relevant code would be



As per this site, in the "Initial Document Section", you can add headers. Please try that, although i am not sure if it will help.
 
Vishal Baid
Ranch Hand
Posts: 42
1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Sumit Patil wrote:I have not used XSL-FO. The above statement was if you were using some servlet to render the pdf file. The relevant code would be



As per this site, in the "Initial Document Section", you can add headers. Please try that, although i am not sure if it will help.



I done this but the problem remain same for me.
Kindly Advice on this. Is their any other way to do this ?
 
Sumit Patil
Ranch Hand
Posts: 296
Eclipse IDE Firefox Browser Tomcat Server
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Try this


The Link
 
Vishal Baid
Ranch Hand
Posts: 42
1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Sumit Patil wrote:Try this


The Link



Hi Many Many Thanks.
Problem is solved now.
 
reply
    Bookmark Topic Watch Topic
  • New Topic