In javascript how to invoke save as dialog box ,which saves .pdf files only

Through javascript i generated a save as dialog box. the main problem is , it is only saving .html and .doc files by default. how to restrict it to save only .pdf files.
the code i used is
function SaveFile(fname)
document.execCommand('SaveAs', null, fname)
<input type="button" value ="save" onclick="SaveFile('');">
/**********************************************************************/

this is actually a Java forum its slightly different from javascript
but try this not sure if it helps
<input type="button" value ="save" onclick="SaveFile('.pdf');">

Similar Messages

  • How do I call browser Save As dialog box before downloading pdf files?

    How do I call browser Save As dialog box before downloading pdf files?
    Here's my favorite scenario:
    1. User clicks button
    2. Save As dialog displays
    3. User chooses location
    4. A set of PDF files download to that location OR a single zip file downloads
    Background:
    I want to ensure the user sees that files are being downloaded. I'm delivering content to users who may not be Web savvy.
    Concern:
    1. User has no clue how to find downloaded files or that files have even downloaded.
    2. I'd like to deliver the set as zip files. Not sure if self-opening zip files still exist.
    FYI:
    I'm using jQuery UI buttons. Not sure if that factors into response.

    Just for clarity, I'm not forcing a download. The user will click a button.
    Click a button or click a link, either way you're technically executing a script to force a download.
    I'm assuming that's the php file resident on the server.
    Yes but that's only part of it.  Once the contact form executes, another script is called up which opens the browser's download dialogue.
    Is there a php script for simply calling the Open/Save dialog box?
    Yes. 
    <?php
    /* This short script forces a file download.
       For simplicity, it's intended to be used for a single file.
       You can use multiple copies of this file (with unique names)
       with different variable values to use it with multiple files.
       Use of this script has a side-effect of hiding the location of the
       file on your server.
    // full server path to file to be downloaded (including filename)
    $Path2File = "path/to-file-on-server.zip";
    // the filename
    $theFileName = "name-of-file.zip";
    //the work gets done here
    header ("Cache-Control: must-revalidate, post-check=0, pre-check=0");
    header ("Content-Type: application/octet-stream");
    header ("Content-Length: " . filesize($Path2File));
    header ("Content-Disposition: attachment; filename=$theFileName");
    readfile($Path2File);
    ?>
    Name this file zip2download.php.
    Add a link to your HTML page:
    <a href="zip2download.php">Download Zip</a>
    Nancy O.
    Alt-Web Design & Publishing
    Web | Graphics | Print | Media  Specialists 
    http://alt-web.com/
    http://twitter.com/altweb
    http://alt-web.blogspot.com/

  • How do I save PDF files by default to the folder of the source file?

    How do I save PDF files by default to the folder of the source file with Acrobat 9.0.0 Standard?

    I am not seeing that behaviour. If I right-click a link to a .pdf file, I get the file saved with the original filename.
    Maybe one of the settings in about:config controls that?
    pdfjs.previousHandler.preferredAction is a setting that has a value of 4 with my setup. I have no idea what that means, and I could not find any explanation anywhere. You could try using different numbers for that value and see if any make any difference. Why has nobody bothered to explain that setting anywhere?

  • How to invoke alt-text for images in a PDF file by Automation

    Hi,
    Can any one help me?
    How to invoke Alt-text for Images in a PDF file using script?
    Thanks for looking into this.
    Regards,
    Sudhakar

    What do you mean "invoke" alt-text?  If Alt-text is there, then it will be presented to a screen reader.

  • How do I save PDF files on my iPad to read later?

    How can I save PDF files from a website on iBooks to read later?

    Open the PDF in Safari and then tap it and you should get a bar at the top of it with 'open in iBooks' as an option - tap that and it should be copied to the iBooks app.

  • How to remove  "save pdf file as" dialog in startdoc with adobe acrobat 6

    We set up pdfWriter as default printer and hope to generate pdf file with startdoc call. The existing code worked great on Adobe Acrobat 5. However, after we upgraded to Adobe Acrobat 6(complete install), the same code behaved differently. Somehow, startdoc always popped out a "save pdf file as" dialog box and ask for the file path but ignored the input path parameter(the pdf file was generated at the path that user manully input in).
    W do not like this dialog box at all and expect silent action. How to remove this annoying dialog box and make the old code working (taking the parameter as pdf file path)?
    Thanks for your help.
    JD

    Hi
    I accessed to a website from my uni library computer using my student account and download a pdf file in there. However, that pdf file contains a line of words saying "Accessed by ... University Library on 30 Mar 2007". This line is printed vertically and on the left side of the page.
    Do you know how to remove that line? I think the website just embedded that line into the file.
    Please help.
    Thank you very much.
    tuanduy

  • How do i resize the Dialog box which executes while baGetFolder command.

    Dear friends
    I am very new to director and working for the project which is already developed by some other vendor. in this project i have to implement the below mentioned requirment so can anyone pls help me upon this will be greatfull.
    How to resize the dialog box which appears while the command baGetfolder triggers. Actualluy the problem i am facing is the title of the dialog box extends its width so the title appears incompleted with "....", how can i solve this problem?. It is very urgent requirment and eagely waiting for yours reply.
    thanks in advance

    Hi sean wilson,
    Thank you veru much for your great help. The title of the dialog box is now adjusted into two lines after changed the" flag" value to 1. Your suggestion is very helpful and excellent. I hope you will be here to help those people who are struggling with technical problems. Once again i wish to thankyou much.
    Thanks and Regards
    E.VenkateshKumar
    Chennai
    India.

  • How can a get a full function distiller dialog box for saving PDF files in Illustrator?

    I would like to know if there is some type of plug-in, etc. out there that would allow me to have all the functionality of a Distiller dialog box when I save a PDF out of Illustrator CS5. Right now, I just have what comes installed with Illustrator. It's a stripped down version of what you would find in distiller.

    In what way is it stripped down? Can you explain what features you want?

  • How do I save pdf files onto my desktop?

    I have converted a word document to pdf and now I want to save it onto my desktop so I can email it to someone.
    How do I save the pdf files from acrobat onto my desktop computer?

    Hi DCG,
    Please follow the below mentioned link, as it shows step by step how to save the PDF files on your desktop:
    http://helpx.adobe.com/acrobat-com/help/export-save-print-documents.html
    Regards
    Gurleen

  • Firefox opens a pdf in the browser but I can't save it as a pdf file. How do I save pdf files as pdfs?

    When I open pdf files in the browser I do not have a way to save the file as a pdf file on my hard drive. I can only save it as a firefox image file one page at a time. I can't print it either except as individual pages from the image file. When I use the "Save As" icon my only options are to save as a Firefox file. What am I missing? Thanks.
    == This happened ==
    Every time Firefox opened
    == Today

    Try this, when I right clicked on the document to rotate the image a noticed a tool bar appeared at the bottom of the page with the save icon. It then disappeared, but by hovering at near the bottom of the document the tool bar appears and I can save the PDF.

  • How to remove a hidden text in pdf file with Acrobat Pro 9. How to save pdf file and remove hidden text?

    I
    I made this file in indesign, the highlited empty spaces indicates that their is a hidden text and it pop up when searching for some words in pdf file. so how can I save pdf file to keep only the seen text ???

    Dear lrosenth,
    I went through some codes/suggestions in internet and I found that I need to have cmap file and cid font file for the respective font since pdf doesn't support unicode fonts directly.
    Can you help me to know where can I get cmap file and cid font file for tamil language font Latha(TrueType) microsoft font.
    Regards,
    Safiq

  • How to save PDF files on an iPad files

    How do I save PDF files onto an iPad?

    There are several common ways to do this:
    1) Email the files to yourself and choose "Open In" from the mail application by long pressing on the attachment(s)
    2) Use a file sharing service like box.net, dropbox, gdrive or skydrive and choose "open in" from those applications
    3) Use iTunes as I describe in response to this thread: http://forums.adobe.com/thread/992991

  • From my email, how do I save a file to a specific folder on my computer. It keeps saving it in the downloads within Firefox.

    I have a quickbooks back-up file from my CPA in my email which I need to save to a folder in mydocuments which Quickbooks can then open. Firefox saves it to a downloads folder and I never get the option to save it somewhere else on my computer. I can't figure out where the downloads file is on the computer.

    {Ctrl + J} to open the Downloads window, right-click any of the files in there and select '''Open Containing Folder''' to open the folder that each of your downloaded files was placed in.
    Tools > Options > General - under the Downloads section, you can check-mark '''"Always ask me where to save files"''' to get a dialog box from Windows Explorer file management for saving files manually.
    The ''"Save files to"'' box shows the folder that Firefox uses to download file into when that other pref isn't selected.
    You can also use '''"Save Link As..."''' if you right-click a hyperlink that you want to download (won't work where JavaScript is used to download files).

  • Avoiding the 'Save PDF File As' dialog when printing to the adobe PDF printer from a service

    Hello, can someone please help.
    I have Adobe Acrobat 8 Pro installed.
    I have an in house application which (among many other things) effectively monitors a directory and prints the file to the default printer. It works fine when run as an application.
    I have set the defaults on the Adobe PDF printer to put the output PDF file into a directory and not to open it so it works silently without prompts.
    When I run my application as a service, it brings up the 'Save PDF File As' dialog and I would like to avoid this. My impression is that if I put the right registry key in then it will work.
    I do not want to do any scripting if I can avoid it.
    Thanks for all constructive help given.

    Thank for your help Bill, but changing settings in the distiller did not seem to work. As my application prints directly to the default application without using anything specific to Acrobat, I was hoping there was a simple way forward. A colleague suggested copying registry entries from the account I logged on as to the S-1-5-18 entry, then rebooting. This had no effect as the prompt still comes up.
    Aandi, I don't have the Acrobat SDK or any experience of it.
    Also I'm not sure where any code/script would sit since the application is stable and so I would rather not change it.
    If it amounts to a few lines of javascript sitting outside the application then that would be of interest.

  • How do I save a file as an unformatted txt file instead of html or rtf?

    How do I save a file as an unformatted txt file instead of html or rtf?

    Use menu Image>Image Size in the image size dialog uncheck Resample and enter 300 in the resolution field and click OK.  Note no Pixels are changed only the resolution setting get changed.  The use Menu Fils>Save As in the save as dialog use the file type pull down and select Tiff then click Save
    In the Tiff Option Dialog in the Image Compression  section set None The click OK.

Maybe you are looking for

  • How to handle the quotes('') in the procedure?

    Hi all, I have been struggling with an issue in the procedure. Let us go to the functionality of the preocedure. I am passing a parameter that has text like ' INDIA,BANGALORE,"INOX,BLR","THILAK NAGAR,JAYA NAGAR "4TH 'T' BLOCK,BANGALORE",560030' Here,

  • How to add fury trim around an image

    What i want to do is add Fur around the outer edges of an image. Frame the image with fur and have the corners with a natural transition. I am working on a Poster for a Pimp/Ho Party and i want to trim the image with "PIMP" fur. Does anyone know of a

  • Why is Evernote listed as a "default browser" in Safari preferences?

    When I go to Safari preferences, it lists Evernote as a choice for a default browser. Any ideas?

  • Prasad Reddy

    Hi Experts, I am working on userexit_save_document_prepare strucked up with the condition please give me suggestion. My condition is to save the sales order: Light Check: In creation mode (T180-TRTYP = 'H'), If the country of the sales organization i

  • RFIDITSR00:Selection criteria for MM invoices in IDITSR_SELECT_V

    Dear Gurus, Could you kindly share with us how you were able to manage the customising settings in IDITSR_SELECT_V for S03CCR report. The customising setting we made are: included Purchases account 6XXXXXXX in IDITSR_SELECT_V for reporting category S