Sometimes, you may need to convert IPYNB to PDF for some reason. How to convert IPYNB to PDF? There are different ways to do that depending on your preferences and tools. In this post, MiniTool PDF Editor shows you three methods.

What Is an IPYNB File

IPYNB (stand for Interactive Python Notebook) files are notebook documents created by Jupyter Notebook, an interactive environment for students and scientists to analyze data using Python language. IPYNB files are usually converted to PDF, HTML, DOCX, and LaTeX formats for sharing, viewing, and printing.

Compared to IPYNB files, PDF files are more portable and compatible and you can easily share, view, and print PDF files on any device or platform. Besides, PDF files can preserve the formatting and features of your IPYNB files. In addition, PDF files can be encrypted and protected with passwords or permissions.

How to Convert IPYNB to PDF

There are several solutions that you can try according to your need.

Way 1. Use Online IPYNB to PDF Converters

One of the easiest ways to convert IPYNB to PDF is to use an online IPYNB to PDF converter, such as Vertopal, Sejda PDF, AllDocs, etc. Vertopal is a free online converter that supports over 200 file formats, including IPYNB and PDF. To use Vertopal, follow these steps:

Step 1. Go to the Vertopal official website. Then click Choose File to select the target IPYNB file from your computer, Google Drive, or Dropbox.

Step 2. Then click Convert and wait for the conversion to complete.

Step 3. Once done, download your PDF file on your local computer.

Way 2. Use a Print Option

Another way to convert IPYNB to PDF is to use a print option from Notepad or Jupyter Notebook app. This method may not preserve all the formatting and features of your IPYNB file, but it is a quick and simple solution. Here is how to do that:

Step 1. Open your IPYNB file with Notepad. Then click File > Print. Alternatively, you can press Ctrl + P to open the Print window.

Step 2. In the pop-up window, select Microsoft Print to PDF as the Printer and click the Print button.

Step 3. In the output window, click Save, name your PDF file, and choose a location to save.

save as PDF

Way 3. Use Google Collab

Google Colab is a free online service that allows you to create and run Jupyter notebooks in the cloud. You can use a command line tool called nbconvert to convert IPYNB to PDF. However, this requires that you have LaTeX installed on your system.

1. You can install LaTeX and nbconvert on Colab using the following commands:

!apt-get install texlive texlive-xetex texlive-latex-extra pandoc

!pip install pypandoc

    2. Then you can run the following command to download your Colab IPYNB file as a PDF which will be saved on your Google Drive. Replace file_name.ipynb with the name of your IPYNB file.

      !wget -nc https://raw.githubusercontent.com/brpy/colab-pdf/master/colab_pdf.py

      from colab_pdf import colab_pdf

      colab_pdf(‘file_name.ipynb’)

      If the command is not working, you can also use Google Colab to download your IPYNB file as a PDF file.

      Step 1. Go to Google Colab’s official website and upload your IPYNB file to open.

      Step 2. Then click the File tab and select Print. You can directly press Ctrl + P to open the Print dialog box.

      Step 3. Then choose Save as PDF as the destination printer. You can adjust the layout, margins, scale, and other settings of your PDF file.

      Step 4. Once done, click Save, select a location, and name your PDF file.

      A Method to Open and Edit PDF

      After you get the PDF file, you can read and edit it using an easy-to-use PDF editing tool like MiniTool PDF Editor. It supports multiple functions and allows you to convert multiple file formats, merge PDFs, create PDFs, compress PDFs, draw PDF files, etc. with simple clicks. If you don’t have a PDF reader installed on your computer, you can download this tool to have a try.

      MiniTool PDF EditorClick to Download100%Clean & Safe

      MiniTool PDF Editor

      Conclusion

      We have learned three methods to convert IPYNB to PDF in this post. Do you have other nice ways to convert IPYNB to PDF? You can feel free to share them with us in the following comment zone.

      • linkedin
      • reddit