but I would like to make a pdf file that contains page numbers and page headers, just like the original book I'm making "facsimiles" of.
Why not skip the html/ePub part entirely and just scan "the original book" to PDF? You're trying to add
the very things that the vast majority of people struggle mightily trying to remove
from scanned in PDFs of books when creating reflowable ebooks.