Udders Udders - 7 months ago 24
PHP Question

View word docs and PDF in browser?

I am currently working on a site that has to have the ability for users to view documents that are uploaded, however they need to be viewable in browser.

I know there is the Google docs viewer (however this does not seem to work when trying toopen it in a fancybox overlay), but are they any other alternatives, maybe some API's that could turn them into Flash or similar, and then I could simply embed it as a swf?

Any help would be greatly appreciated.

Answer

You said "however this does not seem to work when trying toopen it in a fancybox overlay" Did you tried with headers :

header("Content-type:application/pdf");
header("Content-type: application/vnd.ms-word");

For swf conversion see this

Comments