API Docs


You can add and display PDF in your notebook using PDF (Mercury Widget).

Example code:

import mercury as mr
mr.PDF(file_path="example.pdf", width="100%", height=800)

Code explanation:

First step is importing Mercury package. Then choose PDF which you want to display and create code using PDF widget.


  • file_path (string) is name of PDF which you want to display. It's important to have the PDF and the notebook in the same directory.
  • width (value) sets width of PDF. You don't have to type it every time, default value is 100%.
  • height (value) sets height of PDF. This parameter is also unnecessary, default value is 800.


Example from Jupyter Notebook.

More resources