Embed Pdf in Mobile Browsers

PDF Viewer support in mobile browser (iPhone & Android)

If embedding isn't important to you you could just link to the PDF on a seperate page.

Safari (and UIWebViews) supports the rendering of PDFs, im not a 100% sure about Android but I suspect its a similar story.

PDF in safari

embed tag not displaying pdf file on mobile browsers

You need to use object, not embed

<object data="filename.pdf" type="application/pdf" width="100%" height="100%">
<p>Your web browser doesn't have a PDF plugin.
Instead you can <a href="filename.pdf">click here to
download the PDF file.</a></p>
</object>

How to support PDF viewing for all mobile browser?

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>

embed PDF not working in Android Chrome - plugin not supported

You can use Google Drive PDF viewer with Object data

ex.

<object data="https://drive.google.com/viewerng/viewer?embedded=true&url=http://health.ntuh.gov.tw/health/NTUH_e_Net/NTUH_e_Net_no91/%E7%99%8C%E7%97%87%E7%AF%A9%E6%AA%A2.pdf" type="application/pdf">
<embed src="https://drive.google.com/viewerng/viewer?embedded=true&url=http://health.ntuh.gov.tw/health/NTUH_e_Net/NTUH_e_Net_no91/%E7%99%8C%E7%97%87%E7%AF%A9%E6%AA%A2.pdf" type='application/pdf'>
</object>




Related Topics



Leave a reply



Submit