Hello,
You can read the features available in the trial package and purchase licenses on https://www.phpdocx.com/features . There's no free package, but a trial package that can be used to test basic features of phpdocx.
The addBookmark method allows adding bookmarks, but not change them.
After purchasing a license we can provide further support, for example to generate a sample script to illustrate how to accompish the requested task.
Regards.