Oh, if a user is going to be invoking this manually - then you have two choices.
1 - You could use the Actions features of Acrobat itself to do this.
2 - You could write a program that used the SDK (either a standalone app or a custom plugin) that would invoke the necessary conversion function.