Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
1

Remove copied text from highlights without deleting the highlights

New Here ,
Feb 16, 2023 Feb 16, 2023

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. 

 

 

TOPICS
Edit and convert PDFs , How to , JavaScript
1.5K
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
1 ACCEPTED SOLUTION
Community Expert ,
Feb 17, 2023 Feb 17, 2023

You can do it using this code:

 

this.syncAnnotScan();
var annots = this.getAnnots();
if (annots!=null) {
	for (var i in annots) {
		annots[i].contents = "";
	}
}

View solution in original post

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Feb 17, 2023 Feb 17, 2023

You can do it using this code:

 

this.syncAnnotScan();
var annots = this.getAnnots();
if (annots!=null) {
	for (var i in annots) {
		annots[i].contents = "";
	}
}
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Feb 17, 2023 Feb 17, 2023
LATEST

Many thanks, @try67! This is the exact piece of code I was looking for. I very much appreciate your help with this.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Feb 17, 2023 Feb 17, 2023

The simplest would be perhaps not to create these texts:

 

Capture_2302171103.png


Acrobate du PDF, InDesigner et Photoshoptographe
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines