VeryPDF PDF Text Replacer is designed to on multiple files in one go. And you need not only perform one search-replace operation per file; you can setup a list of operations to perform. And in the article, I will show you one way about replacing text in PDF by command line in batch. By this method, you can in PDF easily and you do not even open PDF document. This software also allows you to search text in PDF and give you accurate reports.
Step 1. Preparation
- The method I used to is under the help of software PDF Text Replacer, so please download it first.
- Download PDF Text Replacer. Here I will take the command line version for example. And before downloading, please make sure that you download the right version as there are two versions:GUI and command line.
- For facilitating downloading and uploading, we have compressed this software to zip. Once downloading finishes, please unzip it and check elements in it.
Step 2. Replace Text by Command Line
- Please replace text in complicate with the usage and examples.
Usage:pdftr.exe [options] <Input-file> <Output-file>
- When you just need to replace text in PDF singly, please simply use the following command line.
pdftr.exe -contentreplace "home=>family" D:\in.pdf D:\out.pdf
-contentreplace <string> : this parameter is an order to replace text in page content objects directly
- When you need to replace many words in one PDF in one go, please refer to the following command line.
pdftr.exe -pagerange 1-3 -contentreplace "Old Text=>New Text||VeryPDF=>VeryDOC||My Name=>Your Name" D:\in.pdf D:\out.pdf
-pagerange <string> : set page range for search keywords, e.g., 1,3-5,7. And this parameter is used to specify page range when you replace text in a whole PDF file. And this parameter can enhance the working efficiency greatly.
And when you replace many words in one PDF, please pay more attention to the function of command line, as it is a little complicated. And symbols => , || are necessary.
- Now let us do filed practice in the MS Dos Windows.
- Checking from the MS Dos operation, we can tell that the replacing speed is very fast and all the replacing information can be shown details here. Now let us check the replacing effect from the following snapshot.
By this software, when you replace text, you do not need to detect the text style in source PDF file and then specify the fonts style and size in the output PDF file. All those will be done by this software automatically. If you comparing the input and output carefully, then you may feel powerful replacing text effect. If you want to own one forever, please pay for it. During the using, if you have any question, please contact us as soon as possible.