• Stars
    star
    367
  • Rank 116,257 (Top 3 %)
  • Language
    Jupyter Notebook
  • License
    BSD 3-Clause "New...
  • Created over 4 years ago
  • Updated 6 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Save Jupyter Notebooks as PDF

Jupyter Notebooks as PDF

Binder

This Jupyter notebook extension allows you to save your notebook as a PDF.

Three new features compared to the official "save as PDF" extension:

  1. produce a PDF with the smallest number of page breaks,
  2. the original notebook is attached to the PDF; and
  3. this extension does not require LaTex.

The created PDF will have as few pages as possible, in many cases only one. This is useful if you are exporting your notebook to a PDF for sharing with others who will view it on a screen.

Every <h1> tag in the notebook will be converted into a entry in the table of contents of the PDF.

To make it easier to reproduce the contents of the PDF at a later date the original notebook is attached to the PDF. Unfortunately not all PDF viewers know how to deal with attachments. PDF viewers known to support downloading of file attachments are: Acrobat Reader, pdf.js and evince. The pdftk CLI program can also extract attached files from a PDF. Preview for OSX does not know how to display/give you access to attachments of PDF files.

Install

To use this bundler you need to install it:

python -m pip install -U notebook-as-pdf
pyppeteer-install

The second command will download and setup Chromium. It is used to perform the HTML to PDF conversion.

On linux you probably also need to install some or all of the APT packages listed in binder/apt.txt.

Use it

Create a notebook and the click "File -> Download As". Click the new menu entry called "PDF via HTML". Your notebook will be converted to a PDF on the fly and then downloaded.

You can also use it with nbconvert:

jupyter-nbconvert --to pdfviahtml example.ipynb

which will create a file called example.pdf.

You will have to use Acrobat Reader to see the attachment to your PDF. Preview on OSX can not display PDF attachments.

More Repositories

1

vscode-binder

VS Code on Binder
Python
111
star
2

openrefineder

💠 + 📚 OpenRefine on Binder!
Jupyter Notebook
40
star
3

carina-jupyterhub

🔗 Jupyterhub backed by carina!
Python
15
star
4

pycon17-no-hands

PyCon2017 - No hands!
Python
9
star
5

theia-binder

Shell
8
star
6

joli

Joli notebooks
Python
8
star
7

mailboxzero

📮 A server that provides you an infinite number of mailboxes that you can check via a REST API
Python
8
star
8

kaggle-binder

Use the Kaggle kernels environment on mybinder.org
Dockerfile
6
star
9

binderlyzer

A binder to analyze them all
Jupyter Notebook
5
star
10

isthehubup

Is the hub up?
Python
5
star
11

notebookexec

static site generator + tmpnb + thebe === executable blog posts!
JavaScript
5
star
12

pdf-it

Python
5
star
13

deep-nlp-class

Deep learning for NLP
Jupyter Notebook
5
star
14

binder-datasette

Tools to create a datasette for mybinder.org
Jupyter Notebook
5
star
15

basic-gpu-binder

A basic binderised repository with GPU support
Jupyter Notebook
5
star
16

lhcb-voting

Anonymous, verifiable elections over the web
Python
4
star
17

python-friendlywords

Python
4
star
18

betatim.github.io

Tim Head's website
Jupyter Notebook
4
star
19

GW150914

〰️🌍〰️ Analyse GW150914
Jupyter Notebook
3
star
20

talk-swiss-python-summit-2018

Talk at Swiss Python Summit 2018
Jupyter Notebook
3
star
21

crisis-twitter-guidelines

A simple guide for getting heard during a disaster
3
star
22

NeedForSpeed

Fast or not? Collective wisdom on what is faster than other things.
C++
3
star
23

sparql-notebooks

Sparql notebooks on binder
Jupyter Notebook
3
star
24

git-bounce

Automatic commit messages from your diffs
Python
2
star
25

scikit-learn-gpu

Python
2
star
26

autograded-course-starter

The repository used to manage "awesome course 101"
Jupyter Notebook
2
star
27

lhcb-starterkit

2
star
28

notebook-bot

JavaScript
2
star
29

TimsHome

Source of my home on the web: http://betatim.github.io
Jupyter Notebook
2
star
30

simplez

The Pelican theme used on http://betatim.github.io
CSS
2
star
31

velo-thursday

🚴 The best ride ever!
Python
1
star
32

my-first-binder-1

Python
1
star
33

react-keras

JavaScript
1
star
34

view-metadata

EXIF viewer
JavaScript
1
star
35

essence

Gists from local files, from the command line. Boom!
Shell
1
star
36

geant4-opt

Blackbox Optimisation applied to GEANT4
1
star
37

studyGroupJupyter

📓 Jupyter notebooks code-along for CERN Study Group
Jupyter Notebook
1
star
38

kamal

A simple API usage analyser for your private code
Python
1
star
39

glowing-wookie

Python
1
star
40

reproducible-science-tools

Reproducible science tools workshop
Jupyter Notebook
1
star
41

vim-binder

A Binder with vim installed
1
star
42

dreamview

Dreaming of map tiles, or how to make mapping sparsely populated areas more fun
Python
1
star
43

my-first-binder

A demo repository for learning how to get your repository ready to launch on mybinder.org
Python
1
star
44

self-signed-ssl-certs

Experimenting with self signed certificates and Tornado
Dockerfile
1
star
45

lhcb-science-fiction

Scripts and tools for work on the SciFi (scintillating fibre) detector for the upgraded LHCb experiment
Python
1
star
46

velo-zurich

Jupyter Notebook
1
star
47

sound-array-api-tutorial

Jupyter Notebook
1
star