View pdf file in html page
I have an auto generated PDF file by itext and I need to display that PDF file in HTML. My question is: How to display a local PDF file in HTML using pdf.js? Should that PDF file be generated by some standards? Show
Luke Girvin 13k8 gold badges61 silver badges82 bronze badges asked Jul 22, 2013 at 9:29
2 Implementation of a PDF file in your HTML web-page is very easy.
Make sure to change the width and height for your needs. Good luck! answered Mar 21, 2014 at 21:31
GofilordGofilord 5,8793 gold badges25 silver badges43 bronze badges 10 I use Google Docs embeddable PDF viewer. The docs don't have to be uploaded to Google Docs, but they do have to be available online.
JerabekJakub 5,0614 gold badges24 silver badges32 bronze badges answered Jul 3, 2016 at 17:55
Rahul SinhaRahul Sinha 1,84113 silver badges17 bronze badges 7 1. Browser-native HTML inline embedding:
Pro:
Cons:
2. Google Docs Viewer:
Pro:
Cons:
3. Other solutions to embed PDF:
IMPORTANT NOTE: Please check the X-Frame-Options HTTP response header. It should be SAMEORIGIN.
answered Mar 5, 2020 at 7:03
UkrUkr 2,05116 silver badges16 bronze badges 0 If you want to use pdf.js, I suggest you to read THIS You can also upload your pdf somewhere (like Google Drive) and use its URL in a iframe or
answered Jul 24, 2013 at 16:19 you can display easly in a html page like this
answered Sep 14, 2017 at 9:06
harun ugurharun ugur 1,55115 silver badges17 bronze badges In html page for pc is easy to implement
but pdf show in mobile by this code is not possible you must need a plugin if you have not responsive your site. Then above code pdf not show in mobile but you can put download option after the code
marc_s 713k171 gold badges1314 silver badges1433 bronze badges answered Jun 29, 2017 at 5:01
pradip korpradip kor 4594 silver badges8 bronze badges 1 Portable Document Format (PDF).
Example Sippet:
|