Click here to Skip to main content
15,889,116 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
See more:
I have a pdf file which is open via iFrame in the browser.
It works on windows and mac machines but on android mobile chrome browser the pdf file do not want to open.

Someone have any idea about this ?
Posted
Updated 26-Sep-14 2:02am
v2
Comments
Leo Chapiro 26-Sep-14 8:01am    
Wrong question in wrong forum
ravikhoda 26-Sep-14 8:04am    
why whats wrong in this ? this is simple html browser problem issue.
Leo Chapiro 26-Sep-14 8:06am    
Because it is not about a programming?

1 solution

PDF files are routinely shown in the browsers, even though PDF is not a part of W3 standards (as far as I know). But your product should never rely on the assumption that it happens. This is usually implemented as a browser plug-ins. Not all of your users will have this option, and not all will use it. Moreover, you should not assume that all user have any PDF software at all. But this is not a problem at all.

You just need to put your PDF in a anchor tag, as a file referenced in the href attribute. In this case, the user having a PDF plug-in will have it loaded in the browser. In all other cases, the user will have either a choice to open the file using default software product set for PDFs, if any, or download the file. If there is not any PDF software, the user will be give only one choice: to download a file. This is quite fair, because the user will always be able to view the document later.

There is nothing special you need to do, and, in fact, there is no any need to do anything else.

—SA
 
Share this answer
 

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