# File reference not downloading .pdf file

**URL:** <https://forum.kirupa.com/t/file-reference-not-downloading-pdf-file/265167>\
**Category:** Uncategorized\
**Created:** [July 5, 2008, 5:14am UTC](https://forum.kirupa.com/t/file-reference-not-downloading-pdf-file/265167 "2008-07-05T05:14:39Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Obi\_Wan](https://avatars.discourse-cdn.com/v4/letter/o/e99b99/32.png) [@Obi\_Wan](https://forum.kirupa.com/u/Obi_Wan)\
**Post date:** [July 5, 2008, 5:14am UTC](https://forum.kirupa.com/t/file-reference-not-downloading-pdf-file/265167/1 "2008-07-05T05:14:39Z")

</div>

Hey everyone I was wondering if any one knew how to download a pdf file using the file reference in flash. The code below works with an image such as .jpg, .png but does not work when trying to download a pdf.

```auto

import flash.net.FileReference;
import mx.utils.Delegate;
function downloadResume ():Void
{
	var myRes = "http://privateDomain/beta/downloads/myResume.pdf";
	var fileRef:FileReference = new FileReference ();
	var listener:Object = new Object ();
	fileRef.download (myRes,'myResume.pdf');
}

```

Again if I make the pdf file format into an image format it works. But I was hoping someone could help. Thanks

---

<div class="post-metadata">

**Author:** ![randomagain](https://avatars.discourse-cdn.com/v4/letter/r/35a633/32.png) [@randomagain](https://forum.kirupa.com/u/randomagain)\
**Post date:** [July 6, 2008, 7:15pm UTC](https://forum.kirupa.com/t/file-reference-not-downloading-pdf-file/265167/2 "2008-07-06T19:15:29Z")

</div>

does the web browser open it?

or does nothing happen?

---

<div class="post-metadata">

**Author:** ![Obi\_Wan](https://avatars.discourse-cdn.com/v4/letter/o/e99b99/32.png) [@Obi\_Wan](https://forum.kirupa.com/u/Obi_Wan)\
**Post date:** [July 6, 2008, 7:31pm UTC](https://forum.kirupa.com/t/file-reference-not-downloading-pdf-file/265167/3 "2008-07-06T19:31:39Z")

</div>

[QUOTE=randomagain;2354292]does the web browser open it?

or does nothing happen?[/QUOTE]

The web browser opens it fine, but when you click download it does not save. But it does save other files like I mentioned before jpg’s png’s etc.
