Click here to Skip to main content
15,180,555 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
I am trying to open docx, xls and pdf files via IE11 and chrome browsers using javascript and jquery.

I am able to launch only one out of docx, xls and pdf file.

Could you please help me out.

What I have tried:

I tried with Google docs iframe and other javascript libraries
Updated 11-Nov-19 23:37pm

1 solution

Browsers can display content in-page only if they understand it. For formats like MS Office files the end user must have an extension that enables it, for PDF most browsers has a pre-installed option for it, but the exact use of that is depends on the end user's settings (security related settings)...
In all, to open/download a file is a choice of the end user and not yours... when end user picks 'open' the ability of the browser to display it depends on the installed software and extension (plugin) you have or have not...

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900