🏠 back to Observable

button to insert CSS pagebreaks?

According to https://stackoverflow.com/questions/22601053/pagebreak-in-markdown-while-creating-pdf#29642392 inserting a simple CSS bit would give some control over how things are paginated when using the browsers print menu to create PDF. Because too much of the (especially enterprise/government) world still wants paper (simulation) at some point I guess making it easier to add the snippet through maybe a UI-element would be useful to many

You could make a helper notebook for your org and add a pageBreak = `<div style="page-break-after: always;"></div>` cell to it. Then anyone could import that notebook and put ${pageBreak} in any HTML or CSS block.

Relatedly, I’m not sure if the property would work on Observable because it embeds everything you make on the website into a frame. Maybe you could try calling window.print() inside the notebook?