I want to add some different text on every page on an existing pdf with ghostscript. Can someone help me how to do it? Thanks.
There is no simple way to do this with Ghostscript. (The more complex way would be to write a longish PostScript program that would insert/stamp the text on each page. That would certainly be more work than using pdfmarks).
I suggest you consider to use