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

Selectively delete comments to undo accidental OCR?

Community Beginner ,
Nov 18, 2022 Nov 18, 2022

Copy link to clipboard

Copied

Hello,

 

While working on a PDF in Adobe Acrobat on a series of scanned documents, I accidentally ran the OCR scan. There is now 4800 comments that slow and crash Adobe when I try to naviaget or add any new markups. I have also added bookmarks that I don't want to lose or have to redo as they had to be added manually. I tried using the Remove Hidden Information tool, but then all the bookmarks were lost and it doesn't seem like there's a way to just select the comments/markups. Is there a workaround?

 

Thanks!

TOPICS
Crash or freeze , Edit and convert PDFs , General troubleshooting , How to

Views

2.8K

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 , Nov 18, 2022 Nov 18, 2022

Try running this code (from the JS Console, or a Custom Command):

 

this.syncAnnotScan();
var annots = this.getAnnots();
if (annots!=null) {
	for (var i=annots.length-1; i>=0; i--) {
		var annot = annots[i];
		annot.setProps({lock: false, readOnly: false});
		annot.destroy();
	}
}

Votes

Translate

Translate
Community Expert ,
Nov 18, 2022 Nov 18, 2022

Copy link to clipboard

Copied

As far as I know, OCR doesn't add comments.  Can you post a screenshot of the comments?

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 Beginner ,
Nov 18, 2022 Nov 18, 2022

Copy link to clipboard

Copied

I believe what I did was run the OCR scan when I accidentally tried to search the document. In doing so this happened:

Liam24783980x4r5_0-1668787965066.png

 

Liam24783980x4r5_1-1668787980082.png

The document is a piping and instrumentation diagram so there are now about 4800 of these, and since the author is AutoCAD (i.e. the program used to draft the diagram) it seems like I can't click the first -> scroll to the bottom and shift click -> press delete.

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 Beginner ,
Nov 18, 2022 Nov 18, 2022

Copy link to clipboard

Copied

Edit: turns out the comments are on the original documents. Of the 60 pages of diagrams 12 of them have these comments. Remove Hidden Information does not work, even on the individual un-edited files.

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 ,
Nov 18, 2022 Nov 18, 2022

Copy link to clipboard

Copied

Open the Comments panel, click into the Comments List, press Ctrl+A to select all the comments, then press Delete to remove them all.

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 Beginner ,
Nov 18, 2022 Nov 18, 2022

Copy link to clipboard

Copied

I did try this, but since the comments are imported from the software used to draft the diagrams (it appears as if the author of the comments is AutoCAD) I am not the author and as such can't delete them.

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 ,
Nov 18, 2022 Nov 18, 2022

Copy link to clipboard

Copied

That's not the issue. You don't need to be the author of a comment to be able to delete it.

It's more likely they are locked. After selecting them all, right-clicking one of them and then select Properties and if the Locked check-box is ticked untick it, then try deleting them again. Even if it's unticked, tick it, then untick it, and try to delete them.

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 Beginner ,
Nov 18, 2022 Nov 18, 2022

Copy link to clipboard

Copied

Still no luck, even ticking and unticking it.

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 ,
Nov 18, 2022 Nov 18, 2022

Copy link to clipboard

Copied

Try running this code (from the JS Console, or a Custom Command):

 

this.syncAnnotScan();
var annots = this.getAnnots();
if (annots!=null) {
	for (var i=annots.length-1; i>=0; i--) {
		var annot = annots[i];
		annot.setProps({lock: false, readOnly: false});
		annot.destroy();
	}
}

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 ,
Nov 18, 2022 Nov 18, 2022

Copy link to clipboard

Copied

Be advised the above will delete ALL comments in the file, though.

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 Beginner ,
Nov 18, 2022 Nov 18, 2022

Copy link to clipboard

Copied

Thanks so much for the code snippet, I think it will doe xactly what I'm looking for. However I also need to ask can I run JavScript scripts on Acrobat Standard? Or do I need pro?

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 ,
Nov 18, 2022 Nov 18, 2022

Copy link to clipboard

Copied

Yes, you can use the JS Console for that.

See: https://acrobatusers.com/tutorials/javascript_console

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 Beginner ,
Nov 18, 2022 Nov 18, 2022

Copy link to clipboard

Copied

Hello again,

 

I was able to borrow a copy of Pro from one of my coworkers and got the script to run - worked great and did exactly what I needed, thank you so much.

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 ,
Apr 06, 2023 Apr 06, 2023

Copy link to clipboard

Copied

If you have accidentally run OCR (Optical Character Recognition) on an image and want to selectively delete comments in a PDF, you can follow these steps:

  1. Open the PDF in a PDF editor: Use a PDF editor like Adobe Acrobat or Foxit PhantomPDF to open the PDF.

  2. Open the comments panel: Locate and open the comments panel in the PDF editor. The comments panel will show all the comments that have been added to the PDF.

  3. Select the comments to delete: Use the comment selection tool to select the comments that you want to delete. You can hold down the Ctrl key to select multiple comments.

  4. Delete the selected comments: Once you have selected the comments, right-click and choose "Delete" to remove them from the PDF.

  5. Save the changes: After you have deleted the comments, save the changes to the PDF.

By following these steps, you can selectively delete comments in a PDF to undo accidental OCR. However, keep in mind that this will only remove the comments and will not undo the OCR process itself. If you want to remove the OCR text from the PDF, you will need to use a PDF editing tool with OCR functionality to revert the changes.

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 ,
Mar 09, 2024 Mar 09, 2024

Copy link to clipboard

Copied

LATEST
  1. Look for a delete option, which might appear as a trash can icon, an 'X', or a right-click context menu option.

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