Page Breaks for PDFs

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.

Current workaround (optional)

None

2 Likes

For now, you can add this to add a page break - before a heading or something.

<div style="page-break-after: always;"></div>
19 Likes

thanks @ottovanluchene - that works.

1 Like

I wish there was a native solution for this. Filling a long note with HTML code for every page break doesnt seem like a solution.

3 Likes

Hmm. What am I doing wrong? Here is a snapshot of my pdf with no page breaks.

Don’t add it in a code block.
It will not show up in preview mode.

OK. But it’s so boilerplate - i.e. constant - that you ought to be able to automate it.

2 Likes

I think best solution for this is to get a preview of the final output (being it pdf or MS Word etc) and making some final adjustments. Markdown and paged format documents are fundamentally different in this regard and should remain so. it is only a problem of conversion. apps like PanWriter are helpful for providing that preview before conversion.

2 Likes

Could a CSS snippet solve this? --PB-- → Page break here

I have it in my Text Expander as ::pb.
For quickly adding the above page break trick

4 Likes

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