my question is how can I display a PDF or any office document (such as Office,Excel) document inside a web-page. I am using PHP MySQL to upload the documents to the database, and the documents also open. But, the problem is that the documents get downloaded sometimes instead of being viewed on the web page. This is something I don't want to happen and I want the files to be displayed on the user end even if the user does not have any extension in their browser that displays such files. So basically, what I want is to display the files that are uploaded on MySQL database using PHP. I am using XAMPP on localhost and I want my web application to work locally instead of running on a server. I was previously using and tags but they both download the files apparently, which I don't want to happen.
I have tried PDF.js from Mozilla but it displays PDF files only, whereas I want to display other documents such as word and excel files as well. Google Document Viewer can be a solution but I don't know how can I use it on a local server without facing complications such as a static IP and a domain name server.
You may try to convert the word document using PHP Office to PDF then convert PDF to image using ImageMagick