簡體   English   中英

如何在不使用內置PDF查看器的瀏覽器上查看Web上的PDF?

[英]How to view PDF on web, without using browsers builtin PDF viewer?

有沒有一種方法可以讓我不用使用Google chrome等內置的PDF查看器即可查看PDF? 在此處輸入圖片說明

我要完成的是逐個文件查看PDF。

我設法將PDF文件逐頁拆分,每一頁作為一個單獨的文件。 在此處輸入圖片說明

我需要查看PDF,逐文件查看,並且無法滾動。 當我使用JavaScript查看PDF時,它將始終打開Chrome的PDF查看器。

編輯:我正在使用帶有Pyramid框架的Python作為后端。

<script>
    window.open('test.pdf','mywindow','width=400,height=200')
</script>

感謝那些可以提供幫助的人!

 $('.btn').click(function(){ $('.modal').on('show.bs.modal',function(){ $(this).find('iframe').attr('src','http://www.tutorialspoint.com/php/php_tutorial.pdf') }) $('.modal').modal({show:true}) $('iframe').load(function() { $('.loading').hide(); }); }) 
 <!-- jQuery library --> <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js"></script> <!-- Latest compiled JavaScript --> <script src="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script> <button class="btn btn-primary">show modal</button> <div class="modal fade bs-example-modal-lg" tabindex="-1" role="dialog" aria-labelledby="myLargeModalLabel" aria-hidden="true"> <div class="modal-dialog modal-lg"> <div class="modal-content"> <iframe src="" frameborder="0"></iframe> </div> </div> </div> 

這是工作片段。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM