Php download a pdf and open in new window






















I want to open a pdf stored in the database in a new window using php server side script. Actually I want store the file name in data table, which user clicks. So i need a server side script open the things in new window along with the file name So please help me to do the same As far as I know, PHP cant open a new window.

What you can do is to have php print the relevant link in html which when clicked directs a user to the page where the pdf file will be viewed with the appropriate parameters passed by the get method. Provide an answer or move on to the next question. Let's work to help developers, not make them feel stupid. Related Questions. Open pdf file in new window. How to open a new window in maximized Mode. Wpf new window not opening. How to open pdf in new tab. Layout: fixed fluid.

Web04 2. Strip HTML. Encode HTML. Last Updated : 31 Jul, Recommended Articles. Article Contributed By :. Easy Normal Medium Hard Expert. Writing code in comment? Please use ide. Tried to open it on text editor but file is empty.

I tried with. What's wrong with with my PDF file. Add a comment. Active Oldest Votes. Improve this answer. Community Bot 1 1 1 silver badge. Michael Benjamin Michael Benjamin k 84 84 gold badges silver badges bronze badges. My file name is mix of english and japanese character. When I change my file name to only english then everything works well. But when I mix japanese and english character same error occurs which I have mentioned above.

I thought that the problem occurred because my PDF file was corrupted. But that doesn't seems to be the real problem.



0コメント

  • 1000 / 1000