Skip to content
PDFMergely
Merge PDFs

Convert an HTML table to a PDF

Long tables paginated without a row sliced down the middle.

Files never leave your device · No upload · Free
Loading tool…

Exported tables are where browser printing falls apart: a row gets cut in half by a page break, the header only appears on page one, and a wide table runs off the edge of the paper. This lays the table out with your paper size and orientation, and places page breaks so that a row is never split. Landscape plus a slightly smaller margin usually solves a table that is too wide.

How to convert an HTML table to a PDF

  1. 1

    Add the HTML

    Paste the table markup, or open the exported .html file along with its stylesheet.

  2. 2

    Go landscape if it is wide

    Landscape and narrower margins buy a surprising amount of width before anything has to be cut.

  3. 3

    Convert and check the breaks

    Download and skim the page joins. Rows stay whole, so the joins should fall between rows.

Why page breaks are the whole problem

Nobody complains about the fonts. They complain that row 41 is half on page two and half on page three, and that the totals landed on a page of their own. Breaking between rows fixes both.

Frequently asked questions

Does the header repeat on every page?+

That depends on the table markup. A table whose header is in a proper table head section repeats it; one built out of plain rows cannot, because there is nothing marking the header.

My table is too wide. What are my options?+

Landscape first, then narrower margins, then a smaller font in the source, then fewer columns. Something has to give when a table is genuinely wider than the paper.

Can I get this into a spreadsheet instead?+

If the data started as a table, keep the source. Going HTML to PDF and then back out to a spreadsheet loses structure at both ends.

Is my data uploaded?+

No. Everything is rendered in your browser, which matters when the table is a report with real numbers in it.

Related tools