question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

support for alternative notebook PDF converters (e.g. webpdf)

See original GitHub issue

(see #672 and #658 for context)

There are a few engines to convert .ipynb to .pdf, however, we only support the default one provided by nbconvert, which depends on pandoc and text. It has a few downsides such as not being able to render embedded charts (see #658), we should add support for other engines

Issue Analytics

  • State:closed
  • Created a year ago
  • Reactions:2
  • Comments:5 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
edublancascommented, Apr 1, 2022

A few pointers:

This is the implementation of the task that runs scripts. the nbconvert_exporter_name can switch to webpdf

And this is where the notebook conversion logic happens - we rely on nbconvert for format conversion so please check the docs.

Parameters from the pipeline.yaml are passed to the NotebookConverter. example:

  - source: fit.py
    nbconvert_exporter_name: webpdf
    name: fit
    product:
        model: output/model.pickle
        nb: output/report.pdf

If you try this, it’ll fail and ask you to run pip install nbconvert[webpdf], that’s ok, the user can install it once they see the message.

If you try again, it’ll complain that chromium is missing. The exporter has an option to automatically download it so we need to ensure that when we instantiate the webpdf exporter, we set that to true. So you’ll need to dig into nbconvert’s docs/surce code

1reaction
idomiccommented, Apr 1, 2022

Go ahead! Thank you for contributing and reach out if you have any issues.

Read more comments on GitHub >

github_iconTop Results From Across the Web

nbconvert Documentation - Read the Docs
For converting notebooks to PDF with --to webpdf, nbconvert requires the Pyppeteer Chromium automation library.
Read more >
Top 9 Free PDF Converter in 2022 - Wondershare PDFelement
#3: Nuance Power PDF Converter - Free Download for Windows. Another PDF converter program is Nuance PDF. This software supports the conversion of...
Read more >
Pdf doesn't include images · Issue #552 · jupyter/nbconvert
I think the issue here is that our PDF conversion produces latex in a temporary directory, and then runs xelatex on it there....
Read more >
nbconvert: Convert Notebooks to other formats — nbconvert ...
nbconvert tool allows you to convert a Jupyter ·.ipynb notebook document file into another static format including HTML, LaTeX, PDF, Markdown, reStructuredText, ...
Read more >
Best free PDF editors (December 2022) - TechRadar
If you're considering downloading a free PDF editor, a list of top features should include PDF/Office file conversion, OCR software, ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found