How can I search and replace a PDF document using Perl?

Does anyone know about the free Perl program (the preferred command line), the module, or in any case for finding and replacing text in a PDF file without using it as an editor.

Basically, I want to write a program (preferably in Perl) to automate the replacement of certain words (for example, our old address) with several hundred PDF files. I could use any program that supports command line arguments. I know that in CPAN there are many modules that manipulate or create PDF files, but they do not (as I saw) any kind of simple search and replace.

Thank you in advance for any and all advice !!!

+4
source share
2 answers

Take a look at CAM :: PDF . More specifically, the changeString method.

+3
source

How did you create these PDF files in the first place? Finding and replacing from source and re-creating PDF files seems more viable. Direct editing of PDF files can be very difficult, and I don’t know any free tools that can do this easily.

0
source

All Articles