Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Open files (PDF) located on a different server within a network?

Community Beginner ,
Dec 17, 2014 Dec 17, 2014

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.

TOPICS
ActionScript
1.3K
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Dec 17, 2014 Dec 17, 2014

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).

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Dec 17, 2014 Dec 17, 2014


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.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Dec 17, 2014 Dec 17, 2014

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.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Dec 17, 2014 Dec 17, 2014

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.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Dec 18, 2014 Dec 18, 2014
LATEST

whose acrobat does your client want or expect to be used and for what purpose?

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines