Displaying PDF's

Use this board for starting discussions, asking questions, and giving advice on RPG programming for the IBM i platform (and predecessors.)
sarnold905
New User
Posts: 2
Joined: Thu Apr 07, 2011 1:31 pm
First Name: Steve
Last Name: Arnold
Company Name: CertainTeed
Phone: 610-386-3233
Address 1: 750 East Swedesford Road
Address 2: PO Box 860
City: Valley Forge
State / Province: Pennsylvania
Zip / Postal Code: 19482
Country: United States
Contact:

Displaying PDF's

Post 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?
User avatar
David
Profound Logic Staff Member
Posts: 690
Joined: Fri Jan 04, 2008 12:11 pm
First Name: David
Last Name: Russo
Company Name: Profound Logic Software
Contact:

Re: Displaying PDF's

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

Who is online

Users browsing this forum: No registered users and 0 guests