You can use CSS page sizing as well, passing it via meta isn't required.
https://docs.breezypdf.com/metadata#use-css-for-page-size
Headers/and footers are just HTML strings and can be super rich with images etc and customized with CSS. Page numbering is free as well in headers/footers.
Of course you could just use properly positioned <header> and <footer> tags and do whatever you need to with JS for page numbering.