This topic is locked

pdf download

6/16/2008 4:16:01 PM
PHPRunner General questions
D
dakk author

I have a phprunner app that stores PDFs in a web server directory. The download works but clicking on the PDF name opens up a open/save dialog box and when open is selected the pdf opens in Acrobat7. I would like it to open in IE possibly without the dialog box first appearing. Acrobat7 preferences Internet setting is set to open up in a web browser. Any phprunner hack for this? I thought at one time the pdf opened up in IE under a phprunner 4.1 app I was playing with. Any changes from 4.1 to 4.2 in this area?
phprunner 4.2 368 linux/apache

Thanks

J
Jane 6/17/2008

Hi,
try to play with headers in the generated ..._getfile.php file.

D
dakk author 6/17/2008

Thanks Jane. What I did in PHPrunner Visual Editor "view as" settings I used the hyperlink option. My problem then was each pdf has a parent directory named as the pdf(-.pdf) (/nameMe/nameMe.pdf). This function isn't an out of box function that I could see so I modified the generated output/include/ commonfunctions.php "function GetHyperlink" as follows.
$retstr = basename($ret, '.pdf'); //strips .pdf from the database filename creating the parent directory name
$prefix=("//11.11.11.111/wwwroot/dir1/dir2/").($retstr)."/"; //appends the parent directory to the generated path
It works but the problem now is if I regenerate the commonfunctions.php later on I loose the mods. Is there a place in the PHPrunner app that this mod can be added so the generated output would not need changing? I tried "View As" custom but couldn't get it to work. In the mean time I'll play with the _getfile.php suggestion.

Thanks