I tried to do something similar and had a difficult time too. I found that
Text::PDF comes with a tool called pdfstamp. This tool allows placing text anywhere "on" a PDF document in a choice of fonts. It is a perl script and it can easily be incorporated into other scripts. I'd use this to put the numbers on the tix. Then you wouldn't have to modify the template. The only "trick" is to figure out where on the page the numbers go, but that is not too tricky: I put footers on my pages on the third try...
HTH, --traveler