Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

embed tag not displaying pdf file on mobile browsers

Tags:

I used embed tag to show a pdf file on my html page and it is displaying the pdf file very well on a desktop and laptop browser but that is not showing the pdf file on moblie and talbets , is there any way I can make them appear on mobile as well . Here is the concerned code :

<embed src="assets/img/jimbosmenu.pdf" width="900" height="900">

Here is the link to live page . http://jimbosjoint.com/menu

like image 942
Siddharth Sharma Avatar asked Aug 25 '13 19:08

Siddharth Sharma


People also ask

How do I display embedded tags in PDF?

The first method to embed pdf in html is by making use of the object tag in html. The object defines the object that is to be embedded in the page, which in this case is the pdf file to be displayed on the web page, of course.

How do I embed a PDF document?

To attach a file, go to Insert > Attach File in PDF. To embed a file, go to Insert > Embed File in PDF. Browse to and select the file that you want to insert, and click Select on the Select File dialog.


2 Answers

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>
like image 127
Kevin Lynch Avatar answered Sep 20 '22 13:09

Kevin Lynch


show it from google docs like that:

<object width="900" height="900" data="https://docs.google.com/gview?embedded=true&url=http://jimbosjoint.com/assets/img/jimbosmenu.pdf"></object>
like image 24
Tuxes3 Avatar answered Sep 21 '22 13:09

Tuxes3