This article is for my memorization about converting ipynb to PDF
How to create custom COCO data set for instance segmentation - Tony607/labelme2coco. Files for ipynb, version 0.5.1; Filename, size File type Python version Upload date Hashes; Filename, size ipynb-0.5.1-py3-none-any.whl (6.9 kB) File type Wheel Python version 3.5 Upload date Oct 23, 2017 Hashes View.
I had to report paper work commited with python.
then I used jupyter and I found out nbconvert function.
Online Ipynb Viewer
If you have nbcovert and jupyter, it is easy to convert ipynb to PDF.
![How to read ipynb file How to read ipynb file](https://image.winudf.com/v2/image1/Y29tLmZsYW1pbmdvLmlweW5idmlld2VyX3NjcmVlbl8wXzE1OTkwMDM3MjdfMDQ5/screen-0.jpg?h=355&fakeurl=1&type=.jpg)
the way to convert ipynb to PDF is the following :
jupyter nbconvert –to pdf file_name.ipynb
Another way is using template like this:
jupyter nbconvert –to pdf –template what_you_want_to_use file_name.ipynb
refert to the following of help message of jupyter nbconvert.
as metioned, the process above is under where you installed nbconvert , pandoc and etc.
Ipynb Viewer App
If not, install them below
- nbconvert
![Jupyter notebooks ipynb viewer Jupyter notebooks ipynb viewer](https://miro.medium.com/max/2048/0*PsibO5rIffPx31hF.png)
pip3 install nbcovert
- Pandoc
sudo apt-get install pandoc
then run it to convert ipynb to PDF if you suceed!
Congradulation! you are done.
BUT if you get error message like me as follows:
just visit the URL, https://nbconvert.readthedocs.io/en/latest/install.html#installing-tex.
you will find out how to install TeX, if you are linux user, type in the following
sudo apt-get install texlive-xetex
![How How](https://www.tutorialspoint.com/jupyter/images/inside_github_viewer.jpg)
Then you could convert ipynb to PDF with prompt like two wasy below.
jupyter nbconvert –to pdf file_name.ipynb
The line above is my case that I used.
Another way is using template like this:
jupyter nbconvert –to pdf –template what_you_want_to_use file_name.ipynb
you could convert ipynb to a lots of format in Jupyter on web browser,
File - Download as - PDF via LaTex or etc.
In my case, when I used PDF via I had another error, Korean language problem like this:
The solution of the problem is fixing template, base.tplx like this:
usepackage{kotex}
%usepackage[T1]{fontenc}
After typing in kotex like above, Korean Language problem would be resolved.
The location of base.tplx is under lib/python3.5/site-packages/nbconvert/templates/latex.
depending on when you install python with root(sudo) or –user. The location of base.tplx is different
If root(suod), The python site-packages is under /usr/lib
If –user, The python site-packages is under ~/.local/lib
![](https://cdn-ak.f.st-hatena.com/images/fotolife/r/ruriatunifoefec/20200910/20200910011333.png)