1. <embed width= "height=" src= "test_pdf.pdf" > </embed>
<embed v-show= "pdfshow" width= "height=" "src=". /.. /.. /public/data/significant.pdf "> </embed>
Browsers through: , Firefox, IE, Chrome
2, <object classid= "clsid:ca8a9780-280d-11cf-a24d-444553540000" width= "" "height=" "border=" 0 ">
<param name= "SRC" value= "Test_pdf.pdf" >
</object>
Here's the complete point:
<object classid= "clsid:ca8a9780-280d-11cf-a24d-444553540000" width= "100%" height= "100%" border= "0" ><!-- Ie-->
<param name= "_version" value= "65539" >
<param name= "_extentx" value= "20108" >
<param name= "_extenty" value= "10866" >
<param name= "_stockprops" value= "0" >
<param name= "SRC" value= "Testing_pdf.pdf" >
<embed src= "testing_pdf.pdf" width= "100%" height= "$" href= "testing_pdf.pdf" ></embed><!--ff-->
</object>
Browsers through:, IE
Browsers not approved: Firefox, Chrome
3. <iframe src= "test_pdf.pdf" width= "height=" ></iframe>
<iframe src= ". /.. /.. /public/data/significant.pdf "width=" "height=" ></iframe>
Browsers through: Firefox, IE, Chrome
4, direct access to http://127.0.0.1/test_pdf.pdf with the browser (in fact this is not in the Web bar)
Browsers through:Firefox, IE, Chrome
Original website: https://www.jb51.net/article/117166.htm
Https://www.npmjs.com/package/vueshowpdf
Installnpm Install vueshowpdf-sQuick Start//template<vueshowpdf @closepdf="Closepdf"V-model="Isshowpdf":p Dfurl="Pdfurls"@pdferr="Pdferr": Maxscale= ' 4 ' :minscale= 0.6 ' :scale= ' 1.1 ></vueshowpdf> <span class= "compare" @click = "Sigtab" > Significance test Table </span>//javascriptImport vueshowpdf from ' vueshowpdf' vue.component ("Vueshowpdf", vueshowpdf);Export default { Data:{ return:{ //pdfurls:'//cdn.mozilla.net/pdfjs/tracemonkey.pdf', pdfurls: ' Http://localhost:3000/data/significant.pdf ',isshowpdf:false } },methods:{ Sigtab () {this.isshowpdf=true}, closepdf(){ This . Isshowpdf = false }, pdferr(errurl) { console. Log(Errurl); } },Components:{ vueshowpdf } }
# # parameter Description
- Closepdf is the starting function when you close the PDF.
- V-model whether to display PDF
- Pdfurl file Address of PDF
- Pdferr file Address Resolution error when the function that is triggered returns the wrong PDF address
- Maxscale Maximum magnification default 2
- Minscale minimum magnification default 0.8
- Scale default magnification default 1.2
Server.js
Const EXPRESS = require (' Express ');Const PATH = require (' path ');App.use (Express.static (Path.join (__dirname, ' Public ' ));
Display PDF files in Web pages and popup pdf in Vue project