If header & footer are being printed on all pages when printing a long invoice (Multiple pages) then you can enable continuous bill printing option, please follow the steps below
Step 1 : Click on the Profile icon on the right bar then click on settings option
Step 2 : Click on the Print options
Step 3 : Scroll down to “Document Print Setting” section and select “Continuous Printing for Multi-page Invoices” option then click on “Save Button”
Now it will print header on first page of invoice and footer on last page of invoice. See before and after image below