PDF.jsの使用

viewer.html使用します

 

GitリポジトリからPDFプラグインをダウンロード

 

使用

   window.open( 'ドメイン/static/pdfjs/web/viewer.html?file =' + encodeURIComponentで( 'ドメイン' + PDFファイルパス)、 'PDF' );
  
例えば:  
  window.open(
「HTTPS://mail.chengdu ?.gov.cn /静的/ pdfjs /ウェブ / viewer.htmlファイル= '+ encodeURIComponentで(' https://mail.chengdu.gov.cn/11.pdf ')' PDF「);

 

 

 

おすすめ

転載: www.cnblogs.com/zsy0712/p/11411031.html