The only way you can do this is by using an Acrobat plug-in. Discussing plug-in development is a bit outside the scope of this site (which is for Acrobat users, not developers who create add-ons to Acrobat). If you want to discuss plug-in programming, please use the Acrobat SDK forum:
https://forums.adobe.com/community/acrobat/acrobat_sdk
Karl Heinz Kremer
PDF Acrobatics Without a Net
PDF Software Development, Training and More...
http://www.khkonsulting.com