Page 1 of 1

Displaying PDF's

Posted: Thu Apr 07, 2011 3:26 pm
by sarnold905
I am new to ProfoundUI programming. I was given a sample program where a Textbox & View button are used to display a PDF. The PDF file name is first entered into the textbox (called RptPath), then the view button is pressed, which runs the following java script:
window.open(get("RptPathID")).

My problem is that it seems like the program attaches "/WWW/ProfoundUI/htdocs" to the front of whatever is put in the textbox. If "/Invoices/Invoice123.pdf" is entered in the textbox, it will only display if the system finds document "/WWW/ProfoundUI/htdocs/Invoices/Invoice123.pdf."

I have many PDF's saved in the IFS and would like to be able to view them without having to move them first to /WWW/ProfoundUI/htdocs.

Is there a way to display PDF's from anywhere in the IFS, either using the java script or any other method?

Re: Displaying PDF's

Posted: Thu Apr 07, 2011 3:36 pm
by David
The folder /www/profoundui/htdocs is the "root" folder for the Apache server instance. This means that it can only serve files that are located there.

Also, as you've seen it interprets all paths as if /www/profoundui/htdocs is the root of the entire file system, which it is as far as Apache is concerned.

This is done for both organizational and security purposes. Otherwise, a savvy user would be able to just download a file from anywhere on your IFS.

Serving the files from other locations would involve either custom Apache configuration, or some custom web programming (i.e. RPG/CGI, PHP, J2EE, etc.).