PDF.js use

Use viewer.html

 

Download pdf plug-in from the Git

 

Use

   window.open ( 'domain /static/pdfjs/web/viewer.html?file =' + encodeURIComponent ( 'domain' + pdf path), 'PDF' );
  
for example:  
  the window.open (
'HTTPS: //mail.chengdu ? .gov.cn / static / pdfjs / web / viewer.html file = '+ encodeURIComponent (' https://mail.chengdu.gov.cn/11.pdf '),' PDF ');

 

 

 

Guess you like

Origin www.cnblogs.com/zsy0712/p/11411031.html