# Creating a pdf download button

**URL:** <https://forum.kirupa.com/t/creating-a-pdf-download-button/102398>\
**Category:** Uncategorized\
**Created:** [February 23, 2004, 1:05pm UTC](https://forum.kirupa.com/t/creating-a-pdf-download-button/102398 "2004-02-23T13:05:07Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Sharon\_Chapman](https://avatars.discourse-cdn.com/v4/letter/s/c57346/32.png) [@Sharon\_Chapman](https://forum.kirupa.com/u/Sharon_Chapman)\
**Post date:** [February 23, 2004, 1:05pm UTC](https://forum.kirupa.com/t/creating-a-pdf-download-button/102398/1 "2004-02-23T13:05:07Z")

</div>

how do i go about creating a button that will allow people on my site to download a pdf form that i have produced. i’m guessing when i asign actions to the button i need to tell it to download the pdf. is there a step by step guide to doing this somewhere? thanks

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [February 23, 2004, 1:17pm UTC](https://forum.kirupa.com/t/creating-a-pdf-download-button/102398/2 "2004-02-23T13:17:42Z")

</div>

You can just use getURL to link to your pdf file:

```auto

getURL("http://www.server.com/file.pdf","_blank");

```

Maybe you can leave the “\_blank” out, I’m not sure.

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [February 23, 2004, 1:20pm UTC](https://forum.kirupa.com/t/creating-a-pdf-download-button/102398/3 "2004-02-23T13:20:52Z")

</div>

you’ll want \_blank so it wont overtake the movie and will open in its own page. If you want to force a download, the easiest thing to do is zip it. Otherwise you would need a server-side script to prevent the browser from opening it directly using the adobe reader plugin

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [February 23, 2004, 2:11pm UTC](https://forum.kirupa.com/t/creating-a-pdf-download-button/102398/4 "2004-02-23T14:11:34Z")

</div>

thanks for that.

when u say '[http://www.server.com/file.pdf","\_blank](http://www.server.com/file.pdf%22,%22_blank)"  
does the [server.com](http://server.com) = the server provider name or my website name and does file = the file name of my pdf?

sorry for being such a learner on the subject!

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [February 23, 2004, 2:15pm UTC](https://forum.kirupa.com/t/creating-a-pdf-download-button/102398/5 "2004-02-23T14:15:49Z")

</div>

do i then just include my pdf in the folder with all my swf & html files?

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [February 23, 2004, 2:21pm UTC](https://forum.kirupa.com/t/creating-a-pdf-download-button/102398/6 "2004-02-23T14:21:27Z")

</div>

Well, server is your domain name, and file is indeed your pdf file. [http://www.server.com/file.pdf](http://www.server.com/file.pdf) is just an example url though - you can replace it with yours. For example, mine could be:

[http://www.voetsjoeba.com/pdf/randomname.pdf](http://www.voetsjoeba.com/pdf/randomname.pdf)

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [February 23, 2004, 2:27pm UTC](https://forum.kirupa.com/t/creating-a-pdf-download-button/102398/7 "2004-02-23T14:27:21Z")

</div>

thank u Voetsjoeba. you’ve made it sound quite simpl. i’ll give it a go. senocular’s suggestion of server-side script has completley lost me. think that’s well beyond my capabilities.
