Inserting headers and footers, print document WITHOUT saving it first?

I would like to print multiple PDF’s, often hundreds at a time. I need to insert a header and a footer before printing. I DO NOT WANT to save the document first, this will be a maintenance issue on our side. So can I print the document WITH INSERTED headers and footers WITHOUT saving the document first. If so, what would the code be?
Many thanks
Luke

@Bokkie1

Are you working with .NET or Java API? You can add header and footer and then save PDF document into a stream object for printing it as per your requirements.

I am using .NET. Thanks for the reply.