Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

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>

iMac (24-inch Early 2009), OS X Mountain Lion (10.8.5), 4GB RAM

Posted on Oct 7, 2013 11:51 PM

Reply

There are no replies.

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

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.