PDF Viewer support in mobile browser (iPhone & Android)

34,649

Solution 1

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

Solution 2

No browsers can support native rendering of PDF files without a plugin (except Google Chrome as claimed here).

But you can you Google Docs Viewer to display PDF files inside a webpage like explained here.

Share:
34,649
Pinoy2015
Author by

Pinoy2015

A software craftsman, an architect, a lead, with over a decade of demonstrated experience in designing, coding and supporting software systems and solutions.

Updated on July 27, 2020

Comments

  • Pinoy2015
    Pinoy2015 almost 4 years

    Does <object> tag widely supported in mobile browser?! I'm trying to embed a PDF file but it seems that it is not supported.

    I'm using the following html for viewing PDF

    <object data="pdf/sample.pdf#view=Fit" type="application/pdf" width="100%" height="400px"> 
        <p>It appears you don't have Adobe Reader or PDF support in this web browser. <a rel="external" href="pdf/sample.pdf">Click here to download the PDF</a></p>
    </object>
    

    and using the PDFObject but both of them are not working in mobile browsers!