How show a .PDF directly in a new tab |
[eluser]Pachat[/eluser]
With HTML, its trivial : http://mysite.com/document/invoice/081002.pdf But, for security reasons, the file is not under http, but somewhere upper, like here : Code: ... I based my download helper on CI donwload helper by placing MY_download_helper.php in system/applcation/helpers In this file, I changed in the force_download function "attachment" by "inline" in the following line : Code: header('Content-Disposition: inline; filename="'.$filename.'"'); But FireFox (or IE) still asks me if I want to see the file or download it, and then only shows it in a new window. Is there a way with CI to have the file open directly in a new tab by just one click?
[eluser]Pachat[/eluser]
Thank for your answer. Finally, I found easier to rely on the "natural" mechanism of the browsers by copying the file temporarily to a random subdir under www |
Welcome Guest, Not a member yet? Register Sign In |