Thanks for getting back to us.
Furthermore, when you are talking about page numbers, does it mean Page Number text somewhere in HTML to assume if its one page or they are actual page numbers in the output PDF? In second case, Aspose.HTML does not offer any feature to edit/modify PDF files. You need to use Aspose.PDF in order to add header/footer in the PDF document according to page numbers.
You can assign different height and width to the Page Size in order to control the orientation. For example, if page is in landscape mode, you can switch height and width parameters in the Size() Class to produce a landscape oriented PDF.
Please take into account that as per our understanding of your use case, you need to generate PDF from an HTML template by specifying desired page size, margins, orientation, etc. Once the PDF is generated, you want to modify it and add different header/footer in it based on the page numbers.
If our understandings are correct, we would like to suggest you use Aspose.PDF instead of Aspose.HTML because, Aspose.PDF provides both capabilities i.e. HTML to PDF Conversion and Modifying PDF documents.
Please let us know in case you have further inquiry.