Q: How do I enable annotations (to show the annotation creation tools) on the PWS WebViewer?
A: If you are using the a custom config script, you can do the following:
if (window.location.href.indexOf('&a=1') === -1) {
window.location.href += '&a=1';
}
Alternative, you can use the PWS API's view method in non-redirect mode. The response will be in xml containing the temporary viewer URL, which you can then append "&a=1" before redirecting to it.
e.g.
https://api.pdftron.com/v2/view/...?redirect=false
Note that PWS WebViewer disables annotations by default because annotation saving and loading is application logic that should be handled by your own server. Just by enabling this flag, the tools will allow you to create annotations, however, they will not be persisted. For an example of how to save annotations, see the annotationHandler.php in the WebViewer download package.