简体   繁体   中英

print pdf image in Jupyter Notebook in Chrome

I wanted to print out pdf image in Jupter notebook. I would normally use this command:

from IPython.display import IFrame
IFrame("image.pdf", width=600, height=300)

However, this only works in Mozilla Firefox and not Chrome. I get a greyed out window instead. Is there any way I could display it in Chrome too?

Thanks

I actually tried the above code and it was the same. I looked it up and found the following workaround posted.

from IPython.display import display_pdf with open('image.pdf', "rb") as f: display_pdf(f.read(),raw=True) qiita.com by Japanese

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM