简体   繁体   中英

converting jupyter notebook to PDF in FireFox in Ubuntu 20.04 using pyppeteer

I am shown this option to convert my jupyter to PDF (how should I fix it?) 在此处输入图片说明

But when I try it, I get the following error: 在此处输入图片说明

This is rather weird error since I am using Firefox not Chromium browser.

As stated in the documentation , https://nbconvert.readthedocs.io/en/latest/install.html#installing-chromium :

For converting notebooks to PDF with --to webpdf, nbconvert requires the Pyppeteer Chromium automation library.

Pyppeteer makes use of a specific version of Chromium. If it does not find a suitable installation of the web browser, it can automatically download it if the --allow-chromium-download flag is passed to the command line.

So, even if you use Firefox for browsing, you need Chromium to convert notebooks to PDF with this exporter based on Pyppeteer ( --to webpdf ).

You coud also try using --to pdf , which makes the conversion to PDF via LaTeX, but you should have LaTeX installed in your system.

Or you could try notebook-as-pdf ( --to PDFviaHTML ), but I think it is also based on Pyppeteer .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM