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

way to batch remove annotations of PDFs in a folder?

Engaged ,
Nov 26, 2019 Nov 26, 2019

Is there a way to batch remove all annotations of PDFs in a given folder?

thanks.

TOPICS
Edit and convert PDFs
11.0K
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
2 ACCEPTED SOLUTIONS
Community Expert ,
Nov 27, 2019 Nov 27, 2019

You can use this JavaScript code as a part of an Action (if you have Acrobat Pro) to achieve it:

 

this.syncAnnotScan();
var annots = this.getAnnots();
if (annots!=null) {
	for (var i=annots.length-1; i>=0; i--) {
		annots[i].destroy();
	}
}

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 ,
Nov 27, 2019 Nov 27, 2019

You need to also add a Save command, as I've mentioned before.

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
Adobe Employee ,
Nov 26, 2019 Nov 26, 2019

Hi there,

 

Thanks for reaching out. As described above, you want to remove the annotations from the PDFs in a folder.

 

Do you have Adobe Acrobat Reader DC (Freeware) or Adobe Acrobat DC (Subscription based)?

 

If you have Adobe Acrobat DC, you may use the Action Wizard Tool to remove the annotations from the PDFs in a folder. You can also create your own actions. You can access and manage the actions by clicking Tools > Action Wizard.

 

For more detailed information please use the help article here (https://helpx.adobe.com/in/acrobat/using/action-wizard-acrobat-pro.html#run_an_action)

 

Let us know how it goes.

 

Regards

Amal

Regards
Amal
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
Engaged ,
Nov 27, 2019 Nov 27, 2019

Thanks. This works one by one from within a folder and requires a lot of manual intervention. I do have Acrobat DC Pro, but also have thousands of PDFs in a folder.

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 ,
Nov 27, 2019 Nov 27, 2019

You can use this JavaScript code as a part of an Action (if you have Acrobat Pro) to achieve it:

 

this.syncAnnotScan();
var annots = this.getAnnots();
if (annots!=null) {
	for (var i=annots.length-1; i>=0; i--) {
		annots[i].destroy();
	}
}
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
Engaged ,
Nov 27, 2019 Nov 27, 2019

Thanks for this. I am really not sure how to create an action and add it to the A. Wizard.

 

Also, is "this" meant to be replaced by a value (ie a folder name)?

 

 

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 ,
Nov 27, 2019 Nov 27, 2019

- Read this: https://helpx.adobe.com/acrobat/using/action-wizard-acrobat-pro.html

 

- No! Do not edit the code in any way.

You'll just need to add a command to save the file after the one that executes the script.

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
Engaged ,
Nov 27, 2019 Nov 27, 2019

I just realized how to add this to Actions. But the script likewise obliges manual intervention for each file's deletions. Is there a way to get around manual intervention too? ("Any" seems necessary; I used the script without modification.)

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 ,
Nov 27, 2019 Nov 27, 2019

Tick off the "Prompt User" check-box under the commands you add to your Action, and no user interaction will be required.

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
Engaged ,
Nov 27, 2019 Nov 27, 2019

Thanks. did that. It is asking me to Save each PDF as it gets modified and appears on the screen. Is there no way to have this run in the background unattended?

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 ,
Nov 27, 2019 Nov 27, 2019

What options did you select under the Save command?

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
Engaged ,
Nov 27, 2019 Nov 27, 2019

It's erratic. It runs through a few files, then posts the prompt: 

 

Screen Shot 2019-11-27 at 9.07.23 AM.pngexpand image

 

Then it goes on and repeats the pattern. If I say No it interrupts. It could be that some of these files were already altered on a previous batch of attempts, where I did say Save. Not sure now. (I'm using a copy of a folder for the trials)

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 ,
Nov 27, 2019 Nov 27, 2019

What exact command did you add?

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
Engaged ,
Nov 27, 2019 Nov 27, 2019

Just the action named delete folder annotations with this Java Script:

 

this.syncAnnotScan();
var annots = this.getAnnots();
if (annots!=null) {
for (var i=annots.length-1; i>=0; i--) {
annots[i].destroy();
}
}
 
with Add Folder defaulted on open and prompt user un-checked.
 
In one case I'm prompted to print a file and not to save it!
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 ,
Nov 27, 2019 Nov 27, 2019

You need to also add a Save command, as I've mentioned before.

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
Engaged ,
Nov 27, 2019 Nov 27, 2019

Got it. That is working. It's not superfast, but it is running unattended (with the exception of one PDF (so far) that wants to be printed; I say No/Cancel, and it goes on running and completes the job). No idea how long it will take to run through thousands of PDFs but I can try that next.

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 ,
Nov 27, 2019 Nov 27, 2019

The print dialog appears because there's code embedded in that file that opens it when the file is opened, most likely.

 

Acrobat is not really built for processing thousands of files in a single process. You might have to do it in batches.

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
Engaged ,
Nov 27, 2019 Nov 27, 2019

OK, thanks for all the help. At least I have a foundation to try with. much obliged.

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 ,
Oct 28, 2024 Oct 28, 2024

For others who are looking to batch remove annotations of PDFs in a folder and don't have Acrobat DC Pro or don't want to mess with scripts, BatchPurifier is a 3rd party GUI tool that can do that out of the box.

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 ,
Nov 05, 2024 Nov 05, 2024
LATEST

I know this was a long time ago, but if you are stilling looking for a simpler solution and are using a microsoft product I created an application that can easily do this by simply selecting the folder in your folder browser

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