added printing order header and footer inputs, fixes #23, fixes #24, fixes #22