You will need to build an Xsl document and load it into APEX.. Here is the link showing how to do advanced printing with APEX..:
I checked the link and it is really helpful.
Does that provide the ability to set the page level items i.e. &P10_XXXX to the header instead of just static header. I will try that but just wanted to know if you tried this before.