如何在jupyter文件浏览器中打开pdf文件?

时间:2019-03-20 00:00:18

标签: pdf jupyter-notebook

我想使用jupyter笔记本的文件浏览器打开pdf文件。但是,当我单击时,它总是打开一个新选项卡并显示黑屏。

enter image description here

3 个答案:

答案 0 :(得分:0)

如果要使用jupyter文件浏览器打开pdf文件,则需要使用Firefox-Google Chrome会阻止它。

或者,要在jupyter笔记本单元中打开pdf,则可以使用IFrame-但同样,它不适用于Chrome。

from IPython.display import IFrame, display
#filepath = "http://wikipedia.org" # works with websites too!
filepath = "file.pdf"
IFrame(filepath, width=700, height=400)

答案 1 :(得分:0)

在Chrome中使用PDF Viewer扩展名

答案 2 :(得分:0)

我花了几分钟寻找一个解决方法,并在jupyter项目中找到了一个github issue,OP发现了issue is resolved by installing the PDF viewer plugin to Chrome

我刚刚安装了它,现在我在Chrome笔记本中看到了PDF。

相关问题