Skip to main content
Participant
Feb 27, 2020 11:20 AM UTC
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
Feb 27, 2020 5:22 PM UTC

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
Mar 20, 2020 11:14 AM UTC

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
Nov 6, 2023 9:00 AM UTC

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
Jul 15, 2024 10:34 AM UTC

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

Translate
try67
Community Expert
Community Expert
Feb 27, 2020 12:27 PM UTC

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
Feb 27, 2020 1:28 PM UTC
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
Feb 27, 2020 5:22 PM UTC

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