How to put custom code in pdf?

Is it possible to put custom code (actual date) above the grid when i print a pdf file (grid2pdf)? What function do i have to change?

You can place static image on the top of pdf page, there is no any other public way to alter pdf export.