Copy link to clipboard
Copied
Using Acrobat Pro DC, I have to find every instance of a letter and "add note to replace text." For example, I locate each instance of "A" and under Comments, select "Add note to replace text" and enter "G" in the comment box. Is there a way to create an action for this process?
Thank you very much for any guidance or resource you could provide!
Copy link to clipboard
Copied
Do you mean each letter on its own, or as a part of word?
You can do it using a combination of the Search & Remove Text command and a script to convert the Redact comments created by that command to Replace Text comments.
Copy link to clipboard
Copied
Thanks so much for the guidance. I'll need to find or learn to write scripts. I wasn't sure if there was an action already created that I wasn't aware of.
I have to replace instances of letters (and or numbers). For example, a document is Appendix A, so all diagrams are labeled A.1, A.2. Now, this file needs to be Appendix B, so I need to use comments to replace all "A"s with "B." I'm required to show the change in comments, not just edit the letter in the file itself.
Copy link to clipboard
Copied
Well, the comments only show what needs to be replaced. They can't be used to actually replace the text.
That is something you should do not on the PDF file, but outside of Acrobat..
Copy link to clipboard
Copied
Correct, I need to add a comment to every instance of a letter. I do not want to replace any text in the file.
Copy link to clipboard
Copied
An Acrobat Script Cannot replace text on the page.
The kind of operation you are proposing needs to be done on the original document.
PDF is not an editing or document creation format. It is a publishing format.
Copy link to clipboard
Copied
I don't want to edit the document. I need to find every instance of a letter and then add a comment that indicates to replace the text. Currently, what I do is search for "A" throughout the document and manually add a comment to replace that "A" with "B" for instance. That instruction is only given in the comment. I don't want to actually change the "A" on the file to "B." Thanks!
Copy link to clipboard
Copied
There are a couple of ways to implement a solution for this. One way is to use the "doc.getPageNthWord()" function to find your words and then add one of the annotations, such as the strike thru annot, over the word location.
See this article for more information:
https://www.pdfscripting.com/public/PDF-Page-Coordinates.cfm
But there is a simpler method, which is to use the Redaction Search. This Acrobat Pro feature searches for specified words and adds a redaction annotations to the found words. A script can then replace these annots with a different type. This is the same technique used for the "Find and Highlight Words" action here:
https://acrobatusers.com/actions-exchange/
Copy link to clipboard
Copied
Hi Jem19,
Did you find solution for this case yet?
Copy link to clipboard
Copied
The solutions were described above. If you're looking to purchase a tool that will allow you to do it without having to write the code yourself please feel free to contact me privately and we could discuss it further.