# button to insert CSS pagebreaks?

**URL:** <https://talk.observablehq.com/t/button-to-insert-css-pagebreaks/3521>\
**Category:** Feedback\
**Created:** [June 27, 2020, 9:33am UTC](https://talk.observablehq.com/t/button-to-insert-css-pagebreaks/3521 "2020-06-27T09:33:13Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![steltenpower](https://avatars.discourse-cdn.com/v4/letter/s/c0e974/32.png) [@steltenpower](https://talk.observablehq.com/u/steltenpower)\
**Post date:** [June 27, 2020, 9:33am UTC](https://talk.observablehq.com/t/button-to-insert-css-pagebreaks/3521/1 "2020-06-27T09:33:13Z")

</div>

According to [doxygen - pagebreak in markdown while creating pdf - Stack Overflow](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

---

<div class="post-metadata">

**Author:** ![j-f1](https://yyz2.discourse-cdn.com/flex030/user_avatar/talk.observablehq.com/j-f1/32/368_2.png) [@j-f1](https://talk.observablehq.com/u/j-f1)\
**Post date:** [June 27, 2020, 11:23am UTC](https://talk.observablehq.com/t/button-to-insert-css-pagebreaks/3521/2 "2020-06-27T11:23:32Z")

</div>

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?
