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

Remove copied text from highlights without deleting the highlights

New Here ,
Feb 16, 2023 Feb 16, 2023

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. 

 

 

TOPICS
Edit and convert PDFs , How to , JavaScript

Views

1.2K

Translate

Translate

Report

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

correct answers 1 Correct answer

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 = "";
	}
}

Votes

Translate

Translate
Community Expert ,
Feb 17, 2023 Feb 17, 2023

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 = "";
	}
}

Votes

Translate

Translate

Report

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

Copy link to clipboard

Copied

LATEST

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

Votes

Translate

Translate

Report

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

Copy link to clipboard

Copied

The simplest would be perhaps not to create these texts:

 

Capture_2302171103.png

Votes

Translate

Translate

Report

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