1
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

jupyter-notebookをそのまま画像にしたい

Last updated at Posted at 2019-07-29

概要

  • jupyter-notebookをそのまま画像化したい。という内容
  • スクリプトは相当雑です。(スミマセン。)

こんな状況

  • (あまり無いが、、)Jupyterの一連のドキュメントをそのまま画像化したい。
  • ChromeアドオンのFireShotで画像化しようとしたらうまく行かない。(画像が一部切れる)
  • Jupyter→HTMLで一度出力してみたら、左右の余白が気になる。
    image.png

回避方法

  1. 一度、htmlで出力する。
  2. ![image.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/183826/4cfc75aa-ddd9-35b5-36c1-c75584992554.png)
  3. htmlを開き、下記のブックマークレットを実行
  4. javascript:document.getElementById('notebook-container').setAttribute('style','margin: 0 0;padding: 0 0;width: 100%');
    
  5. 余白が無くなるので、[FireShot](https://chrome.google.com/webstore/detail/take-webpage-screenshots/mcbpblocgmgfnpjjppndjkmgjaogfceg?hl=ja)で画像化。めでたしめでたし。
  6. ![hoge.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/183826/e22963cf-b44c-0606-cd6c-f9d6e5493e0e.png)
1
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?