my dog learned polymorphism*
The moose likes HTML, CSS and JavaScript and the fly likes Saving Word or PDF document Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "Saving Word or PDF document" Watch "Saving Word or PDF document" New topic
Author

Saving Word or PDF document

Jas Oberai
Ranch Hand

Joined: Jan 16, 2005
Posts: 231
Hi Friends,
I need to provide two links on my HTML page,such that it allows my resume to be saved in Word or PDF document as per the link clicked.I want that when someone clicks the link,the open/save pop-up box should come-up,like we do in JSP changing the mime-types.Please help me if you can.
Thanks


SCJP 1.4 (88%)<br />SCWCD 1.4 (88%)
Eric Pascarello
author
Rancher

Joined: Nov 08, 2001
Posts: 15376
    
    6
You can not do that since the browser will perform the default action that the browser is set to do. If it knows the file type it knows to load it in the browser, if it does not know it, it asks you to save it.

Most people know to right click to save, I would not worry about it.

Eric
Jas Oberai
Ranch Hand

Joined: Jan 16, 2005
Posts: 231
Thanks Eric,
Ok..so can i just give the option to save the document in Word or PDF format.If yes,can you tell me or refer me some link that shows you how to accomplish this.
Thanks
Eric Pascarello
author
Rancher

Joined: Nov 08, 2001
Posts: 15376
    
    6
There is nothing in HTML or JavaScript to force a save as window....
Jas Oberai
Ranch Hand

Joined: Jan 16, 2005
Posts: 231
Thanks Eric,
Ok..actually i was seein this site(http://www.codebump.com/cb/resume.htm), on which the creator gives you the option of saving the resume in word/pdf format.And,I was tryin to implement somewat similar functionality in my site.Ok,so as you say.the user needs to save the document by right-clicking,so what i need to do for that??
Cheers
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Saving Word or PDF document