Skip to main content
Participating Frequently
November 18, 2022
Answered

Selectively delete comments to undo accidental OCR?

  • November 18, 2022
  • 3 replies
  • 4429 views

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!

This topic has been closed for replies.
Correct answer try67

Still no luck, even ticking and unticking it.


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();
	}
}

3 replies

Participant
April 7, 2023

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.

Participant
March 9, 2024
  1. Look for a delete option, which might appear as a trash can icon, an 'X', or a right-click context menu option.
try67
Community Expert
Community Expert
November 18, 2022

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

Participating Frequently
November 18, 2022

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.

try67
Community Expert
try67Community ExpertCorrect answer
Community Expert
November 18, 2022

Still no luck, even ticking and unticking it.


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();
	}
}
Document Geek
Community Expert
Community Expert
November 18, 2022

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

Participating Frequently
November 18, 2022

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

 

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.

Participating Frequently
November 18, 2022

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.