Paginated pdf with nbconvert and chrome headless?

I see a couple of open issues on print-to-pdf in the browser: https://github.com/jupyter/nbconvert/issues/402
and am wondering whether anyone has tried adjusting the nbconvert html output in postprocessing to customize the @page media css. We need to print formal mid-term and final exam books from jupyter, so control of the pdf page headers and pagebreaks is important. I’d be interested in learning about any routes people have taken from notebooks to this kind of finished pdf.

1 Like

Back to answer my own question – it looks like the path of least resistence will be to use jupytext to convert to Rmd, then use pagedown. If you’re interested in this kind of thing, I highly recommend this talk by the bookdown/blogdown/pagedown co-creater Xihui Xie about this toolchain.

1 Like