Keywords in PDFs are not always completely identical; for example, months, years, numbers, and version numbers may vary across different files. This article explains how to use HeSoft Doc Batch Tool to batch match non-fixed keywords by "using formulas to fuzzily find text" and uniformly replace target content in multiple PDFs. It is suitable for office users who need to batch update reports, contracts, manuals, and archived files.
When batch replacing text in PDFs, the biggest hassle is often not the replacement itself, but that "the content to find is not exactly the same." For example, in a batch of PDF reports, some dates might be April 13, 2017, while others might be May 13, 2019; some number suffixes differ, and some version years vary. If using regular exact search, you would need to set rules for each old piece of content, and the more files there are, the more complex the rules become.
For these types of problems, a more suitable approach is to use wildcards or formulas for fuzzy matching. This article, combined with the operation screenshot of " HeSoft Doc Batch Tool ", introduces how to batch replace unfixed keywords in PDFs. This software is an office tool focused on batch file processing scenarios, helping users centralize repetitive finding, replacing, and saving tasks across multiple PDFs, thereby reducing mechanical operations.
Applicable Scenarios: Irregular but Patterned PDF Keywords
So-called "unfixed keywords" are not completely patternless, but rather change locally. For instance, the month might be April or May, the year might be any four-digit number, the number might be a fixed prefix plus digits, or the version number might be V1, V2, or V3. Although this content varies, it can be described using rules.
In an office environment, such batch replacement needs are very common: batch updating PDF report dates; uniformly replacing years in contracts; changing old version numbers in multiple PDF manuals to new ones; replacing batch numbers in project materials; processing PDF files exported from Word, docx, doc, Excel, or PowerPoint. As long as the text in the PDF is recognizable and the target text has a pattern, you can consider using fuzzy find-and-replace.
Effect Preview: Old Keywords Exist in PDF Content Before Processing
In the sample folder, there are multiple PDFs: 1.pdf, 2.pdf, 3.pdf, and 4.pdf. For batch tasks, the first step is not to start modifying immediately, but to confirm the scope of files to be processed, to avoid adding irrelevant files to the task.

After opening the unprocessed PDF, you can see "April 13, 2017" present on the page. The red box marks the month and year that need replacing. They are typical unfixed keywords: in other files, the month and year may differ, but they belong to the same category of content.

Effect Preview: Keywords Uniformly Replaced After Processing
After the batch processing is complete, the corresponding position in the PDF becomes "August 13, 2026". Based on the results, the month and year have been replaced, while the original layout and other content remain. For office documents that require maintaining the PDF page format, this method of directly finding and replacing content within the PDF is more aligned with practical needs.

Operation Step 1: Open the PDF Keyword Find and Replace Entry
After running " HeSoft Doc Batch Tool ", select "PDF Tools" on the left. The software interface displays PDF-related functions in card form. According to the screenshot, you need to select "Find and Replace Keywords in PDF".

The purpose of this step is to enter the PDF body content processing function. Since this article deals with text inside PDF files rather than file names, do not select file name-related tools. After entering the correct entry, you can later set the search method and replacement list for PDF content.
Operation Step 2: Batch Add PDF Files
After entering the function, the page displays as a wizard-style flow, with Step 1 being "Select records to process". The top right corner provides options like "Add File", "Import Files from Folder", "Clear," and "More". For a small number of files, you can use "Add File"; for a large number of PDFs in a directory, "Import Files from Folder" is recommended.

In the screenshot, the list already has 4 PDFs added, with file paths located in D:\test\, all with the .pdf extension. After importing, check the record count, file names, and paths to ensure all PDFs intended for this processing are included. If there are files in the list that do not need processing, they can be removed via the operations column. After confirming everything is correct, click "Next" at the bottom.
Operation Step 3: Select Fuzzy Text Search Using Formulas
After entering "Set processing options", first look at "Search Mode". The interface has "Exact Text Search" and "Fuzzy Text Search Using Formulas". If the keywords to replace are completely identical, you can choose exact search; however, the topic of this article is unfixed keywords, so you should select "Fuzzy Text Search Using Formulas".

After selecting fuzzy search with formulas, you can express a set of text using rules. In the screenshot example, the first line in the keyword list to find on the left is "April|May", indicating a match for April or May; the second line is "\d{4}", indicating a match for four-digit numbers. The first line in the replacement keyword list on the right is "August", and the second line is "2026".
This setup method is very suitable for batch processing dates in PDFs. It doesn't just look for a single fixed date; instead, it separately finds "month-type text" and "year-type text" and replaces them with new target values. For batch PDF modifications across multiple files and pages, this can significantly reduce the number of rules.
Operation Step 4: Check the Correspondence of the List
When filling in the find-and-replace lists, the most important thing is the correspondence between the row numbers on the left and right. Content matched by line 1 on the left will be replaced using line 1 on the right; content matched by line 2 on the left will be replaced using line 2 on the right. In the screenshot, the month rule corresponds to August, and the year rule corresponds to 2026, which is correct.
If the row numbers are wrong, the replacement results may not meet expectations. For example, the year might be replaced with a month, or the month with a year. For PDFs involving contracts, finance, and report archiving, it is recommended to pause for a few seconds to check the rules after filling them in before proceeding to the next step.
Operation Step 5: Set Output Location and Start Batch Processing
After completing the settings, click "Next". From the top of the interface, you can see the flow also includes "Set save location" and "Start processing". It is recommended to set a new output location instead of directly overwriting the original files. The advantage of this is preserving the original PDFs for easy comparison after processing, and also allowing a quick rollback if the rule settings are inappropriate.
After entering the "Start processing" page, execute the processing according to the wizard. The software will apply the find-and-replace rules to the PDFs in the list one by one. Once processing is finished, open the output files to check key pages and confirm whether the replacement results match expectations. If there are many task files, you can spot-check different files and page numbers to ensure the rules did not match incorrectly.
Common Questions and Notes
1. Does fuzzy search mean arbitrary search? No. Fuzzy search relies on rules; the more accurate the rules, the more reliable the results. Rules like "\d{4}" can match four-digit numbers, but if a PDF contains many four-digit codes, use them with caution.
2. Why is backing up recommended before replacement? The characteristic of batch processing is that it affects multiple files at once. To avoid rework caused by incorrect replacements, it is recommended to copy the original PDFs before processing or save the output results to a new directory.
3. Can multiple keywords be replaced at the same time? It can be seen from the screenshot that the find list and replace list support filling in multiple lines, so multiple groups of keywords can be set. When using them, maintain the correspondence of left and right row numbers and check each item individually.
4. What if the PDF content cannot be selected? If the PDF is a scanned image, the text might not be true text. In this case, regular find-and-replace might not recognize it. It is recommended to open the PDF first and try selecting or copying the target text to confirm it is recognizable text before batch processing.
5. What is the impact of leaving a replacement keyword empty? The interface prompts "Leave blank to delete". If you only want to replace, do not leave the corresponding right-side row empty; if you indeed want to delete a certain type of text, you should first confirm the effect with a test file.
Summary
When keywords in multiple PDFs are not completely identical but have clear patterns, using wildcards or formula-based fuzzy matching is a more efficient processing method. Through " HeSoft Doc Batch Tool ", users can select "Find and Replace Keywords in PDF" in the PDF tools, batch import files, enable "Fuzzy Text Search Using Formulas", fill in find-and-replace rules, and finally output the processing results uniformly.
This method is suitable for common editing tasks in office documents, such as dates, years, numbers, and version numbers. Compared to manually editing PDFs one by one, batch processing can save a significant amount of time and reduce the probability of missed edits. It is recommended to start testing with a small number of files, confirm the rules are accurate, and then process all PDFs to achieve more stable batch replacement results.