sign and stamp pdf with JavaScript

I need a code to stamp my pdf and sign it with some features in acrobat pdf pro.

1- stamp center of first page
2- stamp other pages in the bottom right
3- after all sign the location in the first page.

but I just found the code below,
Could you please help me with that?

I want to stamp and sign with JavaScript in specific locations