How I can export a Jupyter lab notebook as pdf of HTML. I go to File > Export > HTML or PDF but I keep getting an error that the page is not there.

Permanently deleted user

Comments

2 comments

  • Comment author
    Ondrej Klempir DNAnexus Team

    Hi Delnaz,

     

    Please see my ideas below.

     

    When working with the JupyterLab, there are two different filesystems where you can create/open/manage the notebooks. You can either directly work with a notebook stored in the parent project (DNAnexus tab), or with the notebook(s) (e.g. created via Launcher) available on the running virtual machine (small "folder" icon on the left side).

     

    To enable exporting your notebook into html / pdf, please make sure that your notebooks are available on the virtual machine (worker) --> "dx download" it first. With that, you will be able to export the notebook into .html. For pdf export, you will need to install one additional tex library.

     

    --> Open a Terminal and install tex using the following commands:

     

    apt-get update

    apt-get install texlive-xetex

     

    Once this is ready, export to html / pdf could be done also via CLI (in Terminal):

     

    jupyter nbconvert test.ipynb --to pdf

    jupyter nbconvert test.ipynb --to html

     

    Another alternative how to visualize/export/save your notebooks is available via Jupyter Notebook Previewer Tool (VISUALIZE tab).

    0
  • Comment author
    Permanently deleted user

    Thanks Ondrej "jupyter nbconvert test.ipynb --to html" on terminal worked.

    0

Please sign in to leave a comment.