Displaying file (xls, pdf) in browser

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
User avatar
aceconcepts
DevNet Resident
Posts: 1424
Joined: Mon Feb 06, 2006 11:26 am
Location: London

Displaying file (xls, pdf) in browser

Post by aceconcepts »

Hi,

I have a script that uploads files to a directory.

One way of viewing the uploaded files is obviously to request the direct url but what if I want to view the file thru a browser?

What I mean is, is it possible to view a file in a browser e.g. XLS - a spreadsheet or a pdf or word doc.

Any thoughts much appreciated.

Thanks
User avatar
JayBird
Admin
Posts: 4524
Joined: Wed Aug 13, 2003 7:02 am
Location: York, UK
Contact:

Post by JayBird »

Yeah, the user needs to have to required software installed and the options set to view in browser. No way to force it
User avatar
aceconcepts
DevNet Resident
Posts: 1424
Joined: Mon Feb 06, 2006 11:26 am
Location: London

Post by aceconcepts »

Don't mean to be lazy but do you know of any links or software that could be used?

Thanks.
User avatar
JayBird
Admin
Posts: 4524
Joined: Wed Aug 13, 2003 7:02 am
Location: York, UK
Contact:

Post by JayBird »

Errrr....Microsoft Office, Acrobat Reader
User avatar
guitarlvr
Forum Contributor
Posts: 245
Joined: Wed Mar 21, 2007 10:35 pm

Post by guitarlvr »

If I'm correct, PDF's all open in the browser by default and then you save a copy to your PC. The office documents you can choose to open from current location or save when the user is sent to the url for the document. I don't know of a way to actually open excel/word in the browser.

Wayne
User avatar
JayBird
Admin
Posts: 4524
Joined: Wed Aug 13, 2003 7:02 am
Location: York, UK
Contact:

Post by JayBird »

guitarlvr wrote:If I'm correct, PDF's all open in the browser by default...
But only if you have a reader installed
Post Reply