Markdown PDF table page breaks
Tables are easiest to read when the header repeats and a normal row is not split across two pages. MK2PDF’s PDF and browser print styles use thead { display: table-header-group } and break-inside: avoid.
What happens at a page boundary?
- The table header repeats on a continued page.
- A row moves to the next page when it fits there.
- An unusually tall row can still span pages because no PDF engine can fit it on one page.
For best results
Keep cell content concise, use line wrapping, and check the live preview before exporting. For very wide tables, shorten headings or choose a landscape workflow in your source document.
Try the converter · Compare print and download
A repeatable export check
- Open the editor and paste the table below.
- Add enough rows to continue onto another page.
- Open Export, choose A4 or Letter and set the margin in millimetres.
- Compare Download file with Browser print. Check the header on each continued page and inspect the first and last rows.
| Item | Details |
| --- | --- |
| First row | A short description |
| Second row | Another short description |If a table still breaks badly
A row taller than the printable page cannot be kept together. Split very long cell content into several rows or move its explanation below the table. A4 and Letter have different heights, so changing the paper size can change the page boundary. Choose portrait for reports or landscape for wide tables in the export dialog.
Very wide tables need fewer columns or shorter values. Smaller margins provide more usable width, but avoid placing text directly against the paper edge.
Why print CSS matters
A screenshot-based PDF exporter captures pixels and then slices a long image. Chromium instead lays out text for physical pages. Print CSS can request repeated headers and keep normal rows together, while still allowing the browser to paginate exceptionally tall content.
References: MDN: break-inside and Puppeteer: page.pdf().