phpisoverme Posted November 1, 2012 Share Posted November 1, 2012 (edited) This is probably a dumb question but I cannot find the solution nor can several others who looked although they also said "hmm" when I showed them that it works on other sites. We have a small database of pdf files which are displayed to users to read. BUT instead of opening as they should in the browser or even opening automatically in adobe, the cause the <OPEN SAVE CANCEL > window to pop up which is annoying to say the least. For one, all the pdf's are locked up with the Adobe DRM features and the people who put them there are not happy to see the word <SAVE>. It doesn’t matter that there are a thousand other ways to SAVE they just don’t want to see it <IN BIG BOLD FLASHING LETTERS> is there someone here I can hire to mod the code or at least give me a hint as to what to look for and what to do when I find it? Thanks Edited November 1, 2012 by PFMaBiSmAd fixed micro-font size Quote Link to comment Share on other sites More sharing options...
PFMaBiSmAd Posted November 1, 2012 Share Posted November 1, 2012 As a start, you would need to post the code (less any database connection details) that is dynamically outputting the stored pdf documents. Quote Link to comment Share on other sites More sharing options...
phpisoverme Posted November 1, 2012 Author Share Posted November 1, 2012 Thanks to whoever fixed my fonts. I didnt know. I would gladly post the code if I knew where it was. That is the part of the problem. I can follow it all the way up to the display but then.. not sure what to post. There are several PHP modules that do different things. I have been told that the "secret" to this is to use a renamed hyperlink. I dont think that sounds like the best way to do it but.. I tried it anyway. Still made the browser action-options bar open. What would be some possible names to look at? I can post the files in the scripts/documents folder but there are several. That is where all the php is though This same question is all over Google sO i feel a little beter that I am not alone Class.inc.php and settings.inc.php in the HOME folder? There is really only one page. Just a list of of fies or viewing Quote Link to comment Share on other sites More sharing options...
PFMaBiSmAd Posted November 1, 2012 Share Posted November 1, 2012 I have been told that the "secret" to this is to use a renamed hyperlink ^^^ You need to find the cause of the problem, before you can solve it. I'm going to guess that the code that is dynamically outputting the pdf documents is attempting to output the wrong headers and for the cases where it actually works, the headers are being prevented. In the 'view source' of the page that presents the links to the documents, there should be something like - <a href='some_file_name.php?key=value'>the pdf document name</a>. It's the some_file_name.php code that would be the starting place. Quote Link to comment Share on other sites More sharing options...
phpisoverme Posted November 1, 2012 Author Share Posted November 1, 2012 <td class=highBothCell> <a href="index.php?area=main&interface=download&act=get&name=2%2Fa+href.pdf">a href.pdf</a> </td> i think this would be it then Quote Link to comment Share on other sites More sharing options...
phpisoverme Posted November 1, 2012 Author Share Posted November 1, 2012 I know this is longer and I am statig to see double but this is the view source for a page with the same file but if has nothing else on t so i narrowed down to onle the one relevant line. however it as very long. I should also ass this. being a OLD program it is running under php ver 5.3.6.0 but has the option to use all the way to 5.3.17 and i wondered if it is just too far out of date <tr> <td class=label>File:</td> <td class=label><a href="index.php?area=main&interface=download&act=get&name=2%2Fa+href.pdf">a href.pdf</a> (101k) </td> </tr> Quote Link to comment Share on other sites More sharing options...
Pikachu2000 Posted November 1, 2012 Share Posted November 1, 2012 You still haven't posted any code, so there's really no way to tell how far out of date it is. Quote Link to comment Share on other sites More sharing options...
phpisoverme Posted November 1, 2012 Author Share Posted November 1, 2012 thanks to you all. I can see i am out of my league oan over my head. i dont know what you ae asking for so I canot suuplu it. But i appreciate your input Quote Link to comment Share on other sites More sharing options...
PFMaBiSmAd Posted November 1, 2012 Share Posted November 1, 2012 The problem isn't likely to be version specific. It's something the code and/or server is outputting (or not outputting) for headers. And if the pdf content itself is correct, it's not even likely anything to do with the database. Quote Link to comment Share on other sites More sharing options...
phpisoverme Posted November 1, 2012 Author Share Posted November 1, 2012 thanks as i said It is over my head and I cant get enough knowledgeinside in time This was an urgent change that needed to de done today.so too late anyway I wasjust trying to be nice to owner I actually have a coder at a site in India who took a copy of the whole "site" (it isnt really a site only 3mb or less) just a front end for a mysqldatabase. But the time differences messed us up. I missed him by 30 minutes this am And he even had the site up and running on a temporary sever working exactly as needed. My hope is that he is in again tonight but I have to sit here till 3 am to find out. He was a nice guy and I am honorbound to pay him regardless as he went out of his way to help but i really wanted to try to get home tonight before 2am now looks like 4am. Anyway thanks for everything this is not something I am even gettijng paid to do. It is just part of my "overall job" to make things work right Sorry if I did not provide what you asked for as I dont know where to get it even though it is right here in the system. Have a Happy Thanksgiving. Mike Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.