Copy link to clipboard
Copied
I have a client that would like a button that will open a PDF document.
The PDF is located on another server volume than where the Flash projector file (EXE) will reside.
This is the code I would normally use for access a PDF that is located within the same folder structure of the EXE.
btnEquip.addEventListener(MouseEvent.CLICK, openPDF);
function openPDF(event:MouseEvent):void {
var url:String = "project\units\Training\Interactive\data\datasheet.pdf";
var request:URLRequest = new URLRequest(url);
navigateToURL(request);
}
I thought that Flash was limited to accessing files only within it's folder structure or from a web server.
Is it possible to access a file on another server volume?
The path the client is providing starts with \\
I assumed that a drive letter would need to be included.
Copy link to clipboard
Copied
if you know the relative or absolute path to the pdf you should be able to use navigateToURL (as long as you you can accept that not all users will have default pdf viewers).
Copy link to clipboard
Copied
thanks kglad.
I found out that this is possible. What threw me off was documentation I found that stated paths on a windows operating system should use a \ (back slash). Other operating systems such as IOS should use a / (fwd slash).
This will be deployed on a windows system and the / (fwd slash) works, not the \ (back slash).
As long as I have the server volume, this works. It's too bad it's not easy to open the PDF directly in Acrobat. I've read the documentation regarding the use of the proxy.exe and a bat file but this project will have hundreds of PDF links.
Copy link to clipboard
Copied
i don't know why you would need a proxy file for this.
the pdf will open in the user's default pdf viewer. i don't think there is anything you can do to specify that it open in acrobat which is probably a good thing because most users don't have acrobat installed on their computer.
now, if acrobat is installed on your server and you wanted to use it, that would be more complicated but should be doable.
Copy link to clipboard
Copied
I am developing what is basically a stand-alone training application with several levels of navigation, animation and users will be able to click on an equipment shape and view the associated datasheet. PDFs open in the browser right now and the client has asked if it's possible to open them in Acrobat. This is the information I've been able to find to make this possible.
Copy link to clipboard
Copied
whose acrobat does your client want or expect to be used and for what purpose?
Find more inspiration, events, and resources on the new Adobe Community
Explore Now