how to invoke a   "saveas dialog box" which  should save only ".pdf files"

jakiboy
jakiboy used Ask the Experts™
on
using javascript, i invoked a saveas dialog box, the problem is , it is only storing .html & .doc files by default, i want to store .pdf files only

the code i used is


function SaveFile(fname)

 {
   document.execCommand('saveas', null,fname)
  }

<input type= "button" value="save" onclick="SaveFile('');">
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
The
  document.execCommand('saveas', ...

command just opens the File/Save As Dialog of the Explorer. But you can't save a web document as pdf from the File menu of the Explorer.

So you won't get it with the execCommand method.

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial