pagebreak in markdown while creating pdf

user2760375 picture user2760375 · Mar 24, 2014 · Viewed 83k times · Source

I am creating a pdf of markdown text file using doxygen (1.8.6). Now I want to get page break at specific stage in markdown file, I used this link.

In the given link they have mentioned to use '>' for line break. But they haven't mentioned about page break. Yes I can use '>' for page break as well but I have to write this symbol 5 or more times on markdown text file and that makes markdown file in weird look. Is there any other ways to get page breaks in markdown files?

Answer

tomodian picture tomodian · Apr 15, 2015

Since Markdown accepts plain HTML and CSS, simply add this line wherever you want to force page break.

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

If your Markdown editor have trouble exporting PDF correctly, first try to export as HTML, then open with your browser and print as PDF.