Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Jupyter notebooks' pages are not fully captured #30

Open
s1291 opened this issue Jan 14, 2023 · 0 comments
Open

Jupyter notebooks' pages are not fully captured #30

s1291 opened this issue Jan 14, 2023 · 0 comments

Comments

@s1291
Copy link

s1291 commented Jan 14, 2023

Hello,

I am currently attempting to obtain a complete screenshot of a Jupyter notebook page and it appears that using the --full option has no effect on the output

Steps:

  1. Start jupyter notebook:
jupyter notebook

You will see an output similar to:

[I 14:24:59.613 NotebookApp] [jupyter_nbextensions_configurator] enabled 0.4.1
[I 14:24:59.614 NotebookApp] Serving notebooks from local directory: /tmp/allworks
[I 14:24:59.614 NotebookApp] Jupyter Notebook 6.5.2 is running at:
[I 14:24:59.614 NotebookApp] http://localhost:8888/?token=5407f1b5388261b6b2d6df85944231edd6353aeec3225131
[I 14:24:59.614 NotebookApp]  or http://127.0.0.1:8888/?token=5407f1b5388261b6b2d6df85944231edd6353aeec3225131
[I 14:24:59.614 NotebookApp] Use Control-C to stop this server and shut down all kernels (twice to skip confirmation).
[C 14:24:59.658 NotebookApp] 
    
    To access the notebook, open this file in a browser:
        file:///home/s.ouchene/.local/share/jupyter/runtime/nbserver-564465-open.html
    Or copy and paste one of these URLs:
        http://localhost:8888/?token=5407f1b5388261b6b2d6df85944231edd6353aeec3225131
     or http://127.0.0.1:8888/?token=5407f1b5388261b6b2d6df85944231edd6353aeec3225131

  1. Copy the token from the terminal to the clipboard.
  2. Create a new python3 notebook, and add some content to it (it should be long, i.e., its content should fit on more than 1 page).
  3. In the terminal, run:
TOKEN="paste the copied token here from step 2" # e.g 5407f1b5388261b6b2d6df85944231edd6353aeec3225131
NOTEBOOK_URL="Copy the URL of the notebook in the browser" # e.g. http://localhost:8888/notebooks/Fourier_Analysis.ipynb
docker run --network="host" fathyb/html2svg --full --wait 5 --format pdf "${NOTEBOOK_URL}?token=${TOKEN}"  > doc.pdf

Expected output

In my case, I expected to get a PDF document with at least 3 pages (which fully captures the notebook contents).

What happened

The notebook is not fully captured; the PDF document contains only one page.

Thank you

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant