Freeze Panes is not the same as Print Titles
This trips up nearly everyone. Freeze Panes (View → Freeze Panes) pins rows while you scroll on screen. Print Titles (Page Layout → Print Titles) repeats rows on every printed page. They're independent settings, and only the second one affects your PDF.
A frozen header looks perfect while you work, then vanishes from page 2 of the export. Nothing is broken — you set the screen behaviour, not the print behaviour.
Setting it in Excel
Go to Page Layout → Print Titles. In the Rows to repeat at top box, type $1:$1 for a single header row, or $1:$3 for a three-row stacked header. Click OK, then File → Print to confirm the header appears on page 2 in the preview.
The Columns to repeat at left box does the same thing horizontally — useful when a wide table spills across page widths and you want the row labels from column A on every strip.
- $1:$1 — one header row
- $1:$3 — three-row stacked header
- $A:$A in 'Columns to repeat at left' — keep row labels on wide exports
Why the Print Titles box is sometimes greyed out
If you opened Print Titles from inside the Print dialog rather than the Page Layout tab, the fields are disabled. Close the print preview and open it from Page Layout → Print Titles instead. It's also disabled when multiple sheets are selected — click a single tab first.
Doing it at export time instead
If the workbook isn't yours to modify, or you'd rather not change its saved page setup, set the repeated rows in the converter instead. The tool on this site reads the sheet's frozen rows as the default header count and repeats them on every page, and you can override the count directly.