Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Embedding local pdf image in jupyter notebook with IFrame just produces a gray box

I am trying to embed a local PDF image file into a jupyter notebook run in jupyter-lab as follows:

from IPython.display import IFrame
plot_fn = 'example_data/example_cNMF/example_plot.pdf'
IFrame(plot_fn, width=600, height=400)

But this just produces a gray box: Output of attempt to display pdf

Any idea what is going on or how I can fix this? I am using Python 3.6, jupyter==1.0.0 jupyterlab==0.32.1 matplotlib==2.2.2 ipython==6.5.0

like image 368
dylkot Avatar asked Aug 21 '18 13:08

dylkot


1 Answers

What browser are you using? I was using Safari on MacAir, and had this problem.

Changing the browser to Firefox solved the problem.

like image 64
Polv Avatar answered Nov 01 '22 15:11

Polv