• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 675
  • Last Modified:

Open a pdf in acrobat reader not a web browser

I need to create a button that will download a PDF file without launching a second browser window from a Flash .swf. The client does not want a second browser window or even the same browser window to open from the Flash. Prefer to have the PDF start a "download" instead of launching an application.
0
vylan
Asked:
vylan
  • 5
  • 4
1 Solution
 
CyanBlueCommented:
That's only possible if you are running your SWF as a desktop application...  If you are running SWF inside the web browser, the web browser already knows how to open a PDF file, which is opening it inside the web browser window with the PDF Reader plugin...  

The easiest way to download the PDF would be ZIPping it which a web browser will invoke the file download...

CyanBlue
0
 
vylanAuthor Commented:
I figured as much. How about having a script close the window after the download is invoked (using .zip). I need the browser window to close automatically since the client does not want to defer from the online Flash presentation.
0
 
vylanAuthor Commented:
I need a javascript that is in the HTML window that closes and also makes it small. Like the pop-up ads that stay open and are extremely small. So, the AS would getURL and the HTML would start download and  close.
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
CyanBlueCommented:
If you do getURL("path/file.pdf.zip", "_self");, it would not open up a new browser window which is not necessary...  Hence you should not even needing a JavaScript to do extra trimming...

CyanBlue
0
 
vylanAuthor Commented:
actually true on Windows in IE but not on Safari on the Mac.

0
 
CyanBlueCommented:
Um...  That should work both on Mac and PC...  I don't know why it won't work on Safari...  Maybe your Safari is set to download the ZIP file automatically???

CyanBlue
0
 
vylanAuthor Commented:
"Maybe your Safari is set to download the ZIP file automatically"
No it's not. It will open a browser window and download.

I've got an idea for a solution but I'm stuck on one part. I will point to an HTML file that will close using a js. All I need to do is have that HTML page start a download. If there's a hyperlink for the .zip it would require a click. I there a onload function to activate the Mouse Release. Or a "Force Download" option without using .php or .asp? I've researched it and have come up empty.

Vylan
0
 
CyanBlueCommented:
Sorry...  I have no idea why that's working in Safari...  :(

CyanBlue
0
 
CyanBlueCommented:
Any update???

CyanBlue
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 5
  • 4
Tackle projects and never again get stuck behind a technical roadblock.
Join Now