How to remove all highlighted backgrounds in one click?

The PDF-XChange Viewer for End Users
+++ FREE +++

Moderators: TrackerSupp-Daniel, Tracker Support, Paul - Tracker Supp, Vasyl-Tracker Dev Team, Chris - Tracker Supp, Sean - Tracker, Ivan - Tracker Software, Tracker Supp-Stefan

Post Reply
mattad
User
Posts: 143
Joined: Sat Nov 29, 2008 10:37 am

How to remove all highlighted backgrounds in one click?

Post by mattad »

Assume I ihave a long pdf document where I highlighted approx 40 to 50 text phrases. with a background color.

Later I want to remove all these highllghts. I could do this by selecting each highligh part manually step by step and disable it individually.
However this would be very tedious and user unfriendly.

Is there a "remove all highlights" function menu which let me do this with one click?

Matt
Willy Van Nuffel
User
Posts: 2387
Joined: Wed Jan 18, 2006 12:10 pm

Re: How to remove all highlighted backgrounds in one click?

Post by Willy Van Nuffel »

I do not know if it is the most easy way, but this is what I should do:

via PDF-XChange Viewer:
- first, activate the Comments pane, via the View-menu > Other Panes > Comments
- then, in the Comments pane, right click to view the Options menu,
- click "Group By" and then click "By Type"
- finally, right click the group header "Highlight(x)" and click "Delete"
- confirm by clicking "Yes"

or, via PDF-XChange Editor:
- first, activate the Comments pane, via the View-menu > Other Panes > Comments
- then, in the Comments pane, click "Options", and click "Group By Type"
- finally, click the group header "Highlight(x)" and click the "Delete" icon in the toolbar of the Comments pane

Regards.
User avatar
Will - Tracker Supp
Site Admin
Posts: 6815
Joined: Mon Oct 15, 2012 9:21 pm
Location: London, UK
Contact:

Re: How to remove all highlighted backgrounds in one click?

Post by Will - Tracker Supp »

Thanks Willy!
If posting files to this forum, you must archive the files to a ZIP, RAR or 7z file or they will not be uploaded.
Thank you.

Best regards

Will Travaglini
Tracker Support (Europe)
Tracker Software Products Ltd.
http://www.tracker-software.com
mattad
User
Posts: 143
Joined: Sat Nov 29, 2008 10:37 am

Re: How to remove all highlighted backgrounds in one click?

Post by mattad »

Ok, thank you it works.

However it is very tedious and user unfriendly.

A new menu in "Comments" or "Tools" with the label "Remove all comments and highlights" would be better.
User avatar
Tracker Supp-Stefan
Site Admin
Posts: 17892
Joined: Mon Jan 12, 2009 8:07 am
Location: London
Contact:

Re: How to remove all highlighted backgrounds in one click?

Post by Tracker Supp-Stefan »

Hello mattad,

An alternative approach would be to e.g. run some JS that will delete all annotations of a given type for you, and you can have this code assigned to a custom button.

The JS you will need could be as simple as this one:

Code: Select all

annots = this.getAnnots();
for (i = 0; i < annots.length; i++)
{
  if (annots[i].type == "Highlight")
  {
    annots[i].destroy();
  }
}
If you wish to just execute it - press Ctrl+J on your keyboard with the Editor open, and this will open the JS console. Copy and paste the code in the console and execute it.

If you wish to make a custom button for this code you can find a sample e.g. here:
viewtopic.php?f=62&t=22821#p88112
The sample there includes script to print all opened documents - but it can easily be modified to include the code for removing all highlights.

Regards,
Stefan
Post Reply