user782104 user782104 - 6 months ago 57
iOS Question

How to support PDF viewing for all mobile browser?

I am using


to embed a pdf file on my website. e.g.

<object data="abc.pdf" type="application/pdf">
<embed src="abc.pdf" type="application/pdf" />

It works on all desktop browser, but on my android device, it does not show anything. Besides using the google pdf viewer (since it down-grade dramatically the pdf quality), are there any way to support all ios / android device browser? Or, what is the best way to handle this situation? Since there are lots of browser , How can I redirect them to the browser's pdf plugin download page , or should I just tell them to get one ? (Less user friendly). Thanks


The best way is just too just add a link to the abc.pdf it will open on a new tab. This would work best for mobile browser rather than embeding or implementing plugins.

<a href="abc.pdf" target="_blank">ABC PDF file</a>