I'm using comment as a on fly help system for my forms, but my question is are there any way to hide my comments (All of them) so i can make a button for the user to hide or show the comments , thanks in advance
Comments are a type of PDF annotation, and all annotation objects have a hidden property. So you can hide and show any annotation, as long as you know it's name.
Here's the JS reference entry for the Annot Object
1. Select a comment object on the PDF page
2. Run this code in the console window while the comment it selected.
this.selectedAnnots.name = "MyHelpName";
Then you can use the name to show the comment.
this.getAnnot("MyHelpName").hidden = false;
Thank you as much as i can