HTML - how to open "Save as ..." for pdf link

Here's the background of my problem.
BACKGROUND:  I have a webpage for an eBook.  The eBook is a PDF.  The eBook can be downloaded by Mac and Window users.  I want Safari 6.0.5 for the Mac to open the "Save As ..." dialogue box when they click the PDF Download Link for the PDF.  I've gotten this to work for Firefox 24.0 for the Mac with the following html code:
<a style="margin-left:2em;display:inline;" href="file://localhost/Users/jamesminor/Desktop/eBook/Memoir/Memoir.PDF" download="Memoir.PDF">eBook</a>
When a person using Firefox 24.0 for the Mac clicks the  PDF Download Link for the PDF, the "Save As" dialogue box is displayed.  The person can then save the PDF to the desktop.
CONSTRAINTS:  I want the pdf download file to be a PDF.  I know I could compress the file with my Mac but then this file would not open for those using Windows.  I can't use javascript or php code.  I don't want to use self-extracting software because this most often requires that the user have software on their computer to extract or decompress the file.
PROBLEM:  A Mac user can [Command]-click the PDF Download Link to display the contextual menu with Save Linked File to "Downloads" and Save Linked File As ...  menu selections displayed.  It the user clicks "Save Linked File to "Downloads" the following error is displayed: "Safari can't save the file. Safari can't save the file "Downloads-1.(null)" to the downloads folder."  If the user clicks Save Linked File As, Export As: is displayed.  If the user enters the filename, e.g., myfile.pdf and clicks "Save" the following error is displayed: "The document "" could not be exported as "myfile.pdf"."  Apparently Safari thinks that what I am requesting to be saved is empty.
What I don't understand is why I can get this to work for Firefox 24.0 for the Mac . . . and can't get it to work for Safari 6.0.5 for the Mac . . .
Any help to potentially solve my problem will be greatly appreciated.  I've been all over the Internet searching for solutions without any success.
Thank you in advance for your help.
Jim Minor
Message was edited by: James Minor
<Email Edited by Host>

I believe you could use the media-type attribute of xsl.output to
force download, i.e.:
<xsl:output method="text" media-type="application/octet-stream" />
or use an unknown media-type like "text/xxx".
-- Peter

Similar Messages

  • How do I save a word pdf file to png file for up load onto FB

    how do I save a word pdf file to png file for up load onto FB

    What is a Word PDF file? There are Word files and there are PDF files. What does your question have to do with Boot Camp, the subject of this discussion group?

  • How do I save as a pdf while in acrobat cloud?  the "save as" function only lets me save as a complete webpage or html

    how do I save as a pdf while in acrobat cloud?  the "save as" function only lets me save as a complete webpage or html

    What application are you using?
    Acrobat's Save As has 21 choices available.
    Be well...

  • How do you save a web PDF to the iPad2?

    How do you save a web PDF to the iPad2? I want to have a camera manual on my iPad.

    In Safari, click on the PDF link and from the context menu choose Open in New Tab. Then click on the tab: The PDF opens in Safari. At the upper right click on Open In, and from the menu choose Adobe Reader.

  • How can i save a large pdf document in two parts

    how can i save a large pdf document in two parts

    i cannot figure this out, either. and i am also not able to set a custom page size to tile (in this case, tabloid/landscape). the dialog box defaults to my ppd for my epson printer (max size = letter) even when i select the drop down for "printing" to a post script file. I've been using illustrator since it's first release and i'm really surprised that this is rudimentary step in finalizing docs for release has been complicated.

  • What happened to "Save As" for pdfs in Lion?

    What happened to "Save As" for pdfs in Lion? Now there's "Save a Version" which doens't appear to do anything, and Duplicate, which seems redundant...
    How is this new approach saving me time?

    It's not, but it's Apple.
    Apple's approach with its Versions and Autosave features is to do away with the need to Save As altogether since the system's default "Save" feature already does this.
    As you make changes to a document, the system should continuously save all prior versions of it automatically, and you should be able to access these at any time and then duplicate it to continue working. In this way, the system is to an extent always performing "Save As" commands and leaving prior versions in the past, so instead of proactively saving a new copy to preserve your current layout, this layout should exist as-is which you can go to by browsing the saved versions, and then duplicating to a new document to continue working if needed.

  • How can I save passwords for URL's

    How can I save passwords for URL's? I just installed 10.6.7 Snow Leopard. I also had to format my HD drive and reinstall my software.

    Hi,
    From the Safari menu bar click Safari / Preferences then select the Autofill tab. Select the box next to:
    User names and passwords.
    Navigate to a site you normally log into with the user name and password. Click Yes when prompted. That will save that information to a new keychain for you.
    Passwords are actually stored in your Keychain Access application. (Applications/Utilities)
    Carolyn

  • I download itext  for convert jsp to PDF. How to set content type for PDF.

    I download itext for convert jsp to PDF. How to set content type for PDF. I try
    <%@ page contentType = "application/pdf;charset=TIS-620" %>
    , but the page does not PDF.
    Thank.

    PDF files are usually binary files, JSPs are not well-suited for binary content.
    (If you download the result of your JSP you'll see that it is not a valid PDF file; it will have probably a lot of whitespace and linefeeds, that will choke your PDF reader.). The first few characters must be
    "%PDF-" without whitespace.
    You can try using PDF files encoded as text - check if you can use text-encoded PDFs in iText.
    Try using a Servlet instead.

  • How do I save passwords for my apps

    How can I save passwords for apps

    You either write them down somewhere or you check the "remember me" (or something similar) button while in the app.  There is no universal way to save them.  It's up to the writer of the app whether or not to save credentials.

  • How do I save/download a PDF file  as an actual PDF that opens in Adobe Reader?

    When I save/download a PDF from Google Chrome it always saves as an Internet Explorer file instead of a PDF that opens in Adobe Reader.
    Why is this?
    And how can I fix it?
    I really need PDF files for school and work.

    What means "an Internet Explorer file"; what is the file type / extension?
    Also, how do you "save/download" these files?

  • How to open File open/save dialog for a file saved in the Appl. Server?

    Hi Experts,
       My requirement is that, there will be a link in my BSP page "Link to BI Report" and when the user will click this link, the File open/save Dialog box will appear for a BI Report file that will be in a fixed path in the Application Server. I have checked with <a href="/usr/sap/tmp/bi_report.csv"> tag but it is not working. The BI report file will be currently in the CSV format. Any ideas about how to achieve this? Thanks in advance.

    If you want to work in tabbed view, do it like this:
    Select the move tool. Go to the tab that contains one of the image files.
    Drag the image over the tab that has the blank document (Keep holding down the mouse button). Wait till that tab opens.
    Drag & drop the image into the blank document.

  • How to open IE window for .html user manual?

    how to open an IE window for a .html user manual?
    I'm creating a user manual in .html format, and I want to open that file in an IE window when a user click on the "Help" menu (JMenuItem - using ActionPerformed event).
    Is it possible to do that in java?
    What class shall I use?

    Call the following class from ur ActionPerformed();
         import java.io.IOException;
    public class BrowserControl {
       private static final String WIN_ID = "Windows";
       private static final String WIN_PATH = "rundll32";
       private static final String WIN_FLAG = "url.dll,FileProtocolHandler";
       private static final String UNIX_PATH = "netscape";
       private static final String UNIX_FLAG = "-remote openURL";
      public static void displayURL(String url) {
        boolean windows = isWindowsPlatform();
        String cmd = null;
        try {
          if (windows) {
            cmd = WIN_PATH + " " + WIN_FLAG + " " + url;
            Process p = Runtime.getRuntime().exec(cmd);
          else {
            cmd = UNIX_PATH + " " + UNIX_FLAG + "(" + url + ")";
            Process p = Runtime.getRuntime().exec(cmd);
            try {
              int exitCode = p.waitFor();
              if (exitCode != 0)  {
                cmd = UNIX_PATH + " " + url;
                p = Runtime.getRuntime().exec(cmd);
            catch(InterruptedException x)  {
              System.err.println("Error bringing up browser, cmd='"+cmd+"'");
              System.err.println("Caught: " + x);
        catch(IOException x) {
          // couldn't exec browser
          System.err.println("Could not invoke browser, command=" + cmd);
          System.err.println("Caught: " + x);
      public static boolean isWindowsPlatform()  {
        String os = System.getProperty("os.name");
        if ( os != null && os.startsWith(WIN_ID))
          return true;
        else
          return false;
    }

  • How to open the dashboard in PDF, by default is is open in HTML.

    HI ,
    When you run any report in dashboard , it's open in HTML , how do we open that whole dashboard in pdf format.
    Any solutions on it.
    Thanks,
    Malli.

    HI,
    My dash board is integrated with sebel. they have configured one button . when they click on that button our dashboard should open in pdf by default, not in html.
    Any help on this.
    Thanks,
    Malli

  • How to add pdf.js option to 'Open With' dialog for PDF files?

    I've set the action for opening PDF files to 'Always Ask'. Then I can save the file or open it with any other pdf viewer. But the 'open with' option in that dialog box lists only the external pdf viewers. An option in that dialog box to view the file within firefox using pdf.js would be helpful.

    Thanks but I'm aware of that. What I need is to keep the option as 'Always Ask' without changing it to 'Preview in Firefox'. And then when I click on a pdf link, it would open up the dialog box asking what to do. It has several options such as 'Open With' and 'Save File'. What I want is to have 'Preview in Firefox' as an option in that dialog box. So then I can choose some files to open in Firefox, some to download and some to open in external readers. I would choose the action for each file. Is that possible?

  • Acrobat 9.5 on Mac OS 10.6.8: How can I save a 11x17 PDF?

    In Acrobat 9.5, "printing" to a PDF is done using the "PDF" >> "Save as Adobe PDF" dialog, not through a printer driver. I have been trying to save a PPTX (Mac:Powerpoint 2011) into 11x17 landscape, but the result is not what I want. Typically, the PDF output shrinks to 8.5x11. The PPTX file is setup as 11x17, so I would expect Acrobat to pick that up and produce a 11x17 PDF. Tested this with 2 different files - no luck. I have searched online for a solution and also tested the free CUPS PDF driver. I am beginning to suspect that perhaps this could be a limitation in PowerPoint. Regardless of the root cause for this issue: can you share a recommendation how to create a 11x17 PDF in the stated configuration, from Word or PowerPoint on a Mac? Thanks much. 

    Ok.. I've another set of steps through which you may obtain 11x17 without having to have the actual printer connected. First of all, remove all Printers from "Print & Fax" in "Settings" (you can always add them later).
    This time, I have also put up the screenshot to help you in a better way, Request you to follow each of the steps carefully:-
    Step 1:Open the PPTX file in Powerpoint 2011. (I am assuming that the PPTX file is already setup as 11 x 17 in). Go to File, Click on "Print".
    As shown below, Click on "Page Setup" button.
    Step 2: On the "Page Setup" dialog box, Click on "Options" button. (Refer to below Screenshot)
    Step 3:Now select "Manage Custom Size" from the "Page Size" drop down menu. (Refer to below Screenshot)
    Step 4:In the new dialog box, follow the steps as described in below screenshot.
    Click on "+" sign
    Enter a new configuration name, I had used "11x17". Remove any previously existing configurations if you are getting confused.
    Enter the required width and height as 27.9 cm and 43.2 cm respectively.
    Change all the values in the printable area to 0.
    Click "OK"
    Step 5: Select the paper orientation as shown below, and Click "OK"
    Step 6: Select the Slides orientation as shown below and press "OK".
    Step 7: In the "Print" dialogue box that now appears, you must see a drop-down menu right below Presets menu. In this menu, "Copies & Pages" is selected by default.
    You need to select "Paper Handling" in this menu.
    Step 8:Now the "Print" dialogue box may seem like below screenshot.
    Select "11x17" from the "Destination Paper Size" menu. This is the same size that was configured earlier in Step 4.
    Click on "PDF" button at left-bottom corner and select "Save as Adobe PDF"
    Step 9: Click on "Continue" on the "Save as Adobe PDF" dialogue box and provide a suitable PDF name and destination in next dialogue box.
    Step 10: A PDF by that name be produced at the location as specified in previous step.
    I have also put up the screenshot of the PDF that I obtained. And, it's size is as expected (11 in X 17 in).
    Let us know, if your problem is still not resolved.
    Regards,
    Shashi

Maybe you are looking for

  • My iPhone 3gs is lagging and searching for signal all the time. Help!!

    Well, my phones like 3 years old...and latley it's been lagging, turning it's self off, not sending my messages, when I call other people it doesn't go through, and if it does they can barly hear me. I thought it was my sim card so I got a new one an

  • Need to get into Oracle 8i database and don't have credentials

    I need to get into an old Oracle 8i database running on Windows 2000 server. I have very limited experience with Oracle. No one who worked with this system is still employed by the company. I'm in the admin & Oracle DBA groups and have tried using sq

  • Adf bc and toplink

    Dear sirs.: My company will cange from forms to Jdev (adf), my question is: using only adf bc with jboss (for example) , can i do balancing to another jboss machine of some (heavy) objects, without using toplink ? I'm affraid off developing a 2 tier

  • Installation encountered an error please restart your system and try again 15

    any one there to  answer

  • Benefit of DNG Lossy?

    I just watched a free tutorial (well, several!) on Lynda.com regarding LR4 new DNG Fast and Lossy. I understand that the Lossy DNG retains more information versus a jpeg.  But if most of the world is using jpeg - exporting a Raw to Lossy will just fi