dcsimg
A Flash Developer Resource Site

Results 1 to 4 of 4

Thread: How to get PDFs to download to hard drive

  1. #1
    Junior Member
    Join Date
    May 2004
    Location
    Midland, Texas
    Posts
    21

    How to get PDFs to download to hard drive

    I have created a Flash MX 2004 file that has several Adobe PDF icon buttons. What I want them to do when clicked is download an external PDF to the viewers hard drive.

    I have tried the GetURL action such as:
    on (release) {
    //Goto Webpage Behavior
    getURL("http://www.choreo.com/Speedway/PDFs/SA_Flyer.pdf");
    //End Behavior
    }
    ... and this causes the PDF to open in my browser window and replace my Flash site. I guess I could add "_blank" to force it to open in another window, but is there a way to force the PDFs to just download to the users hard drive without displaying the PDF in a browser window?

  2. #2
    Senior Member freshly's Avatar
    Join Date
    Dec 2003
    Location
    Toronto, Canada
    Posts
    439
    try zipping the file maybe it will open automatically in pdf

  3. #3
    It's a long way to the middle launchpad67's Avatar
    Join Date
    Oct 2004
    Location
    Prescott, Arizona
    Posts
    1,387
    One way to always get your viewers to download a file is to .Zip it. This is not the only way but the easiest. You can also do it with Action Script and a php file but it's so easy to just zip it up.
    Your button script will now look like this:

    on (release) {
    getURL("http://www.choreo.com/Speedway/PDFs/SA_Flyer.zip");
    }

  4. #4
    Junior Member
    Join Date
    May 2004
    Location
    Midland, Texas
    Posts
    21
    Thanks for the response. I will give that a try.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center