Page break is corrupted when export to pdf

You can add

<div style="page-break-after: always; visibility: hidden"> \pagebreak </div>

anywhere in your note to force a page break.

There are also CSS export options you can write, e.g., “Page break before every level 1 and level 2 heading”, etc.

@media print {
  h1, h2 { 
  page-break-before: always;
  }
}
4 Likes