# Page breaks for PDF (again)

**URL:** <https://forum.obsidian.md/t/page-breaks-for-pdf-again/101637>\
**Category:** Help\
**Created:** [June 7, 2025, 10:40am UTC](https://forum.obsidian.md/t/page-breaks-for-pdf-again/101637 "2025-06-07T10:40:55Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![JLDiaz](https://forum.obsidian.md/user_avatar/forum.obsidian.md/jldiaz/32/82411_2.png) [@JLDiaz](https://forum.obsidian.md/u/JLDiaz)\
**Post date:** [June 7, 2025, 10:40am UTC](https://forum.obsidian.md/t/page-breaks-for-pdf-again/101637/1 "2025-06-07T10:40:56Z")

</div>

I stumbled upon [this question](https://forum.obsidian.md/t/page-breaks-for-pdfs/13107/11) while checking out the forum’s most viewed posts.

> ### Use case or problem
> 
> When I export to PDF natively via the Obsidian menu. I would like to have the pages breaking at the correct point of the content. Not during a paragraph or item.
> 
> ### Proposed solution
> 
> Insert a char for page breaks that the export to pdf feature adheres to.

I came up with a solution that might be useful, but unfortunately the topic was closed. So I open this new one.

The idea is to use the `---` markdown syntax (used to insert a horizontal rule), for this purpose.

You can add to `.obsidian/snippets` the following snippet in a file called for example `hrule-is-page-break.css`:

```css
@media print {
  hr {
    visibility: hidden;
    page-break-before: always;
  }
}

```

If you activate this snippet in Obsdian Settings → Appearance, then the `---` is transformed into a page break when converting to pdf (it remains visible as a horizontal rule in Obsidian preview).

If you have other notes with horizontal rules and you want to print those “normally”, deactivate the snippet before exporting to pdf.

---

<div class="post-metadata">

**Author:** ![ariehen](https://forum.obsidian.md/user_avatar/forum.obsidian.md/ariehen/32/46932_2.png) [@ariehen](https://forum.obsidian.md/u/ariehen)\
**Post date:** [June 7, 2025, 10:48am UTC](https://forum.obsidian.md/t/page-breaks-for-pdf-again/101637/2 "2025-06-07T10:48:42Z")

</div>

You can add

```auto
<div style="break-after: page;"></div>

```

for page breaks anywhere.

There are also css options for breaking before/after any h1, h2, etc., heading.

This is a great addition to our export options. Thanks!

---

<div class="post-metadata">

**Author:** ![blue\_emperor](https://forum.obsidian.md/letter_avatar_proxy/v4/letter/b/9e8a1a/32.png) [@blue\_emperor](https://forum.obsidian.md/u/blue_emperor)\
**Post date:** [June 7, 2025, 11:24am UTC](https://forum.obsidian.md/t/page-breaks-for-pdf-again/101637/3 "2025-06-07T11:24:34Z")

</div>

Great two solutions although you don’t know beforehand how your content is going to be divided across different pages. I would instantly go and transfer my markdown documents to LaTeX or ODT\[1\] if printing/document export is considered. In some light use cases you can also import markdown to Google Docs\[2\]. For most users Google Docs could be ideal solution to do relatively fast printing on the fly.

* * *

1. [https://github.com/mokeyish/obsidian-enhancing-export](https://github.com/mokeyish/obsidian-enhancing-export) 

2. [https://www.howtogeek.com/google-docs-markdown-import-export/](https://www.howtogeek.com/google-docs-markdown-import-export/)

---

<div class="post-metadata">

**Author:** ![system](https://forum.obsidian.md/uploads/default/original/3X/b/e/bec35fbd23ab28909bb6bfe62cb32eb82dd34019.png) [@system](https://forum.obsidian.md/u/system)\
**Post date:** [September 5, 2025, 11:25am UTC](https://forum.obsidian.md/t/page-breaks-for-pdf-again/101637/4 "2025-09-05T11:25:19Z")

</div>

Closed on September 5, 2025, 11:25am UTC

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.
