Preview: this language version was translated with machine assistance and has not been reviewed by a native speaker. Search engines are asked not to index it.

Command-line mode

Short answer: EnjoyPDF can run without a window: --replace replaces one term, --batch uses a keyword table, --redact runs secure redaction, and --folder processes a whole folder. Exit code 0 means success, 1 failure, 2 usage error, 3 written but verification found problems.

Last updated: Checked against version: EnjoyPDF 2.0

Usage

PDFTextReplacer.exe --replace <input> <output> <find> <replace> [password]
PDFTextReplacer.exe --batch   <input> <output> <keyword-table.xlsx|csv|txt> [password]
PDFTextReplacer.exe --redact  <input> <output> [keywords.txt] [password]
PDFTextReplacer.exe --folder  <input-folder> <output-folder> <keyword-table.xlsx|csv|txt>
  • --folder processes every PDF and image in the folder, including subfolders. It prints progress file by file and writes a processing report to the output folder.
  • To replace with nothing, pass "".
  • Output messages follow the interface language setting. You can also set it with an environment variable such as PDF_UI_LANG=en.

Environment variables

VariableEffect
PDF_OCR_LANG=ch or thRecognize one language only (default: Chinese + Thai)
PDF_OCR_FAST=1Fast recognition: read with the small model only, without a second pass by the standard model
PDF_TWO_STAGE=0Turn off two-stage recognition and use the standard model for all text
PDF_ALIGN=left|right|centerAlignment
PDF_OVERFLOW=allow|compress|containWhat to do when replacement text in an image is too long
PDF_RISK_CONFIRM=1Allow changes to L2 (signed or issued) files; L3 files are never changed in place
PDF_MANIFEST=0Do not write the operation record (manifest.json)

Exit codes

Exit codeMeaning
0Success
1Failure, including when the risk policy blocks the file
2Usage error
3The file was written, but read-back verification or the residue check found problems

In scripts, treat exit code 3 as “needs manual review”, not as success.

Try it first with your own file

After downloading, open a scan, enter a keyword and click "Find". Finding, replacing and saving need no network connection.