Copy link to clipboard
Copied
Copied selected text from highlights is an excellent feature of Adobe Acrobat. And yet, it creates duplicated texts when extracting this type of highlights using other applications. I wonder if there is an automated way to delete the copied text from all highlights (that is, deleting the text that appears in the comment section when the "copied selected text" feature is activated) without removing the actual highlights. I also wonder if someone has developed a JaveScript to do this. Any help would be most appreciated.
You can do it using this code:
this.syncAnnotScan();
var annots = this.getAnnots();
if (annots!=null) {
for (var i in annots) {
annots[i].contents = "";
}
}
Copy link to clipboard
Copied
You can do it using this code:
this.syncAnnotScan();
var annots = this.getAnnots();
if (annots!=null) {
for (var i in annots) {
annots[i].contents = "";
}
}
Copy link to clipboard
Copied
Many thanks, @try67! This is the exact piece of code I was looking for. I very much appreciate your help with this.
Copy link to clipboard
Copied
The simplest would be perhaps not to create these texts: