Skip to main content
Participant
February 27, 2020
Answered

Batch processing - Search and replace text in several thousand PDF files

Dear community,

 

my job is to find and replace a text in several thousand PDF files. It is always the same process - the photo shows the desired change. The wording and position of the text is always the same and the files are all in one folder.

 

I have already tried Acrobat and the detour via Illustrator, unfortunately the action does not go through.

 

I hope I have provided all the necessary information and look forward to your answers or solutions.

 

Greetings Tina

Thom Parker
Thom ParkerCorrect answer
Community Expert
February 27, 2020

Here's an article on scripting redaction:

https://acrobatusers.com/tutorials/auto_redaction_with_javascript/

This article will be helpful as well:

https://www.pdfscripting.com/public/PDF-Page-Coordinates.cfm?sd=40

 

 

Thom Parker - Software Developer at PDFScriptingUse the Acrobat JavaScript Reference early and often

9 replies

JR Boulay
Community Expert
Community Expert
March 20, 2020

Acrobat Pro's Redact tools can do it easily, without programming or JavaScript.

 

1.

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

2.

 

 

 

 

 

 

 

 

 

3.

Translate
Acrobate du PDF, InDesigner et Photoshopographe
Participating Frequently
November 6, 2023

How difficult can it be for Adobe   to just  Add a - replace all-  button?

 

The interface already was  a crime against humanity , but for more than 26 years not adding a "Replace All button" is damn wrong evil !
That

Translate
Participant
July 15, 2024

Something tells me the replace all button is not there on purpose

Translate
try67
Community Expert
Community Expert
February 27, 2020

If the text is always in the same location you can use a script to redact the old text and replace if with the new one, either as the overlay text of the redaction or by adding a text field or comment and then flattening the file.

This will require writing a custom-made script, though.

Translate
TinAthensAuthor
Participant
February 27, 2020
Thanks for your fast respond! I have already expected that an individual script will be required. I will now investigate the solution and send an update here.

Many thanks first!
Translate
Thom Parker
Community Expert
Thom ParkerCommunity ExpertCorrect answer
Community Expert
February 27, 2020

Here's an article on scripting redaction:

https://acrobatusers.com/tutorials/auto_redaction_with_javascript/

This article will be helpful as well:

https://www.pdfscripting.com/public/PDF-Page-Coordinates.cfm?sd=40

 

 

Translate
Thom Parker - Software Developer at PDFScriptingUse the Acrobat JavaScript Reference early and often