You cannot make it so the user isn't aware, but you can use the doc.submitForm method to ping a server.
can i use like this
I don't know what API you're using to set up the action, so I can't tell if that would work. What event are you attempting to attach the code to and where is it specified in that line of code? If I were doing this, I'd create the action in Acrobat and get the submitForm code working, and go from there.
You also need to program the server to respond with something Acrobat/Reader will understand, which in this case can be a 204 No Content type of response.
thanks for your reply
here is the piece of code
PdfWriter writer = PdfWriter.GetInstance(doc, ms);
please suggest me what to do in this case