How to support PDF viewing for all mobile browser?

前端 未结 4 639
旧巷少年郎
旧巷少年郎 2021-01-03 05:54

I am using




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

         


        
                      
相关标签:
4条回答
  • 2021-01-03 06:16

    Better to use Google's Gview. I was having the same problem in my project: PDF was opening separately in mobile browsers, whereas it was opening perfectly in web, so I changed it to use Google Doc Gview. Example is given below:

    <iframe src="http://docs.google.com/gview?
        url=d11xs62myk100c.cloudfront.net/Conference/262/Misc/marcos-ascensin-spanish-national-research-council-csic-spain.ppt&amp;embedded=true'}"
        frameborder="0" width="100%" height="1000">
    </iframe>
    
    0 讨论(0)
  • 2021-01-03 06:17

    you can check the compability of your mobile then download and save as .dox

    0 讨论(0)
  • 2021-01-03 06:28

    One cross-platform solution I've found is ViewerJS.

    Android-compatible embedding can be accomplished using an iFrame by providing both the URL to the ViewerJS project folder and the URL to the PDF to be embedded (relative to ViewerJS), separated by a hash:

    <iframe src='../ViewerJS/#../../pdfs/pdf.pdf'></iframe>
    
    0 讨论(0)
  • 2021-01-03 06:29

    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>
    
    0 讨论(0)
提交回复
热议问题