[Python] How to embed pdfs files in jupyter notebook on Github

Discussão em 'Python' iniciado por Stack, Fevereiro 19, 2025.

  1. Stack

    Stack Membro Participativo

    So I have few pdfs files which I uploaded to my repository on Github. Now I am uploding a jupyter notebook file in the same directory as the pdf files on github and want to display pdfs inside the jupyter notebook.

    I used the following method to embed pdfs in a notebook.

    from IPython.display import IFrame
    IFrame("https://github.com/user/first.pdf", width=900, height=800)


    Now the same thing works when I do this on my local laptop where I store the pdfs in a directory and link that to the jupyter notebook file on my laptop. I can see the pdfs inline too.

    However when I do the same thing on Github, it doesn't show the pdfs and get the following thing:

    [​IMG]

    So am not sure why it is not able to link the pdfs stored on the same repository on github and display them while it works on my local system

    Any help?

    Thanks

    Continue reading...

Compartilhe esta Página