and some other "cool" stuff to make them look great in PDF. I had to comment out these elements in order to make the file work as an ePub, so they won't show up there, 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.

CutePDF, my favorite PDF converter, does not handle paging and page headers very well. Are there other tools that could do this?

Note to moderators: I was not sure if this belonged here in the epub forum or other forums. Feel free to move to correct forum if not belonging in this forum

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.

Heaven knows I'm not trying to add headers/page numbers to the ePub. EPubs shall be reflowable and adding headers must be up to the renderer, not the publisher. On that we agree.

I am trying to find a way to print a nice-looking PDF from the ePub/html source. My original images is full of speckles (it's an old book) and the original format is quite large. The ePub is flowable, so I would like to print it in A5 size, much smaller than the original, without scaling down the text, and retaining the "feeling" of the original book (e.g. retaining the page layout, headers, footers, book structure) but not the exact layout of the text itself.