繁体   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