# How to add a PDF download document link?

**URL:** <https://forum.kirupa.com/t/how-to-add-a-pdf-download-document-link/183490>\
**Category:** flash\
**Created:** [March 27, 2006, 3:09pm UTC](https://forum.kirupa.com/t/how-to-add-a-pdf-download-document-link/183490 "2006-03-27T15:09:00Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![bash](https://avatars.discourse-cdn.com/v4/letter/b/439d5e/32.png) [@bash](https://forum.kirupa.com/u/bash)\
**Post date:** [March 27, 2006, 3:09pm UTC](https://forum.kirupa.com/t/how-to-add-a-pdf-download-document-link/183490/1 "2006-03-27T15:09:00Z")

</div>

I am wondering, how can i add a link for a PDF download on a flash web page? Any suggestions greatly appreciated.

Thank you.

---

<div class="post-metadata">

**Author:** ![serkios](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/serkios/32/608_2.png) [@serkios](https://forum.kirupa.com/u/serkios)\
**Post date:** [March 27, 2006, 3:15pm UTC](https://forum.kirupa.com/t/how-to-add-a-pdf-download-document-link/183490/2 "2006-03-27T15:15:53Z")

</div>

Just use the getURL function to open your pdf. Usually you just target a blank window and it should work okay. For example:

```auto
getURL("http://myURL.com/stuff/somePDF.pdf", "_blank");

```

---

<div class="post-metadata">

**Author:** ![joene](https://avatars.discourse-cdn.com/v4/letter/j/96bed5/32.png) [@joene](https://forum.kirupa.com/u/joene)\
**Post date:** [March 27, 2006, 3:21pm UTC](https://forum.kirupa.com/t/how-to-add-a-pdf-download-document-link/183490/3 "2006-03-27T15:21:11Z")

</div>

You could also use the new FileReference Object in F8:

[AS]  
import flash.net.FileReference;  
var fr:FileReference = new FileReference();  
fr.download(“[http://path/to/your.pdf](http://path/to/your.pdf)”, “standardName.pdf”);  
[/AS]  
The helpfile would be pleased to give you more answers.

---

<div class="post-metadata">

**Author:** ![bash](https://avatars.discourse-cdn.com/v4/letter/b/439d5e/32.png) [@bash](https://forum.kirupa.com/u/bash)\
**Post date:** [March 29, 2006, 3:42pm UTC](https://forum.kirupa.com/t/how-to-add-a-pdf-download-document-link/183490/4 "2006-03-29T15:42:42Z")

</div>

thanks guys.

---

<div class="post-metadata">

**Author:** ![nolafwug](https://avatars.discourse-cdn.com/v4/letter/n/977dab/32.png) [@nolafwug](https://forum.kirupa.com/u/nolafwug)\
**Post date:** [April 25, 2006, 12:35am UTC](https://forum.kirupa.com/t/how-to-add-a-pdf-download-document-link/183490/5 "2006-04-25T00:35:19Z")

</div>

I would like the user to be forced to download the .pdf rather than have it open in their browser, due to the .pdf’s size. I am trying to use the FileReference object with a button like so:

on (release) {  
[COLOR=#0000ff]import[/COLOR] flash.[COLOR=#000080]net[/COLOR].[COLOR=#000080]FileReference[/COLOR];  
[COLOR=#000000] **var** [/COLOR] fr:FileReference = [COLOR=#000000] **new** [/COLOR] FileReferenceCOLOR=#000000[/COLOR];  
fr.[COLOR=#000080]download[/COLOR][COLOR=#000000]([/COLOR][COLOR=#ff0000]“[http://path/to/your.pdf](http://path/to/your.pdf)”[/COLOR], [COLOR=#ff0000]“standardName.pdf”[/COLOR][COLOR=#000000])[/COLOR];  
}

I’ve added a valid path but when I click the button nothing happens. Am I missing something?
