jim li wrote:are you suggesting me to non-programmatically edit the PDF file and use the arobat editor?
No, I'm not suggesting anything in particular. I do know the idea you posted has no hope of working. But I don't know what your actual requirements are, so I'm not making any suggestion about how to implement them. What you posted wasn't the actual requirements, was it? It looked more like an attempt to implement something more reasonable, but I couldn't tell what.