open file without download

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
vidyadoiphode
Forum Newbie
Posts: 14
Joined: Wed Oct 04, 2006 4:46 am

open file without download

Post by vidyadoiphode »

hello,
I want to open pdf file in browser without open/save dialog box.
is it possible?

Actually, when user submit form, all form content opens in pdf. but it first shows open/save dialog box.
i want to open it directly.

Thanks.
User avatar
Christopher
Site Administrator
Posts: 13596
Joined: Wed Aug 25, 2004 7:54 pm
Location: New York, NY, US

Post by Christopher »

I believe that is a browser setting and you can't control how browsers are setup to handle different MIME types. But perhaps I am misunderstanding your question.
(#10850)
User avatar
RobertGonzalez
Site Administrator
Posts: 14293
Joined: Tue Sep 09, 2003 6:04 pm
Location: Fremont, CA, USA

Post by RobertGonzalez »

I know there is a way to do it. What you are asking is if it is possible to generate a PDF file that, when the page makes it, it loads in the browser rather than prompting to download or save. Is that correct?

Keep in mind that some browsers can have their setting overwritten so that file never open in the browser and they are always prompted for a download/save.
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

This is a programming question. Moved to PHP - Code until further notice.
User avatar
pickle
Briney Mod
Posts: 6445
Joined: Mon Jan 19, 2004 6:11 pm
Location: 53.01N x 112.48W
Contact:

Post by pickle »

How are you delivering the PDF? Are you sure all the appropriate headers are being sent?
Real programmers don't comment their code. If it was hard to write, it should be hard to understand.
Post Reply