Batch replace text contents in PDF files in sub-folders (loop through directory and subdirectories)

I used the trial "VeryPDF PDF Text Replacer Command Line (pdftr.exe)". I have noticed some constraints that it does not like long path names to the .pdf file to do the content replace. One folder down it worked. I am not sure it can do multiple folders down.

I am looking to change multiple pdf files to replace "August 19, 2022" to "September 9, 2022" that are in multiple subfolders. What is the command line batch to execute this with the command line?

Also, I want to keep the font type and size the same as the "August 19, 2022" when replace with "September 9, 2022" with the batch command line script.

What is the command to keep the replacement text the same font and size as the original text?

The body is Arial 12 and the footer is Times Roman 10.

Thank you,

David
------------------------------------
VeryPDF PDF Text Replacer Command Line (pdftr.exe)

https://www.verypdf.com/app/pdf-text-replacer/try-and-buy.html#buy-cmd


>>What is the command to keep the replacement text the same font and size as the original text?
>>The body is Arial 12 and the footer is Times Roman 10.

Because your PDF file is using embedded subset font, it's impossible to use original font in PDF file, we have to use a new "Times New Roman" or "Arial" font from Windows system, so we have to use same font for same text, you may run following command line to use "Times New Roman" font and 10 font size,

pdftr.exe -overlaytextfontname "Times New Roman" -overlaytextfontsize 10 -overlaybg-y-offset -4 -overlaybgheight 12 -searchandoverlaytext "August 19, 2022=>September 9, 2022" D:\Downloads\Test_Doc_with_dates.pdf D:\Downloads\out.pdf

image

If you want to process all PDF files in a folder and its sub-folders, e.g., D:\temp folder and its sub-folders, you can run following command line,

for %F in (D:\temp\*.pdf) do pdftr.exe -overlaytextfontname "Times New Roman" -overlaytextfontsize 10 -overlaybg-y-offset -4 -overlaybgheight 12 -searchandoverlaytext "August 19, 2022=>September 9, 2022" "%F" "%~dpnF-out.pdf"

Thank you.
VeryPDF

VN:F [1.9.20_1166]
Rating: 0.0/10 (0 votes cast)
VN:F [1.9.20_1166]
Rating: 0 (from 0 votes)

Related Posts

Leave a Reply

Your email address will not be published. Required fields are marked *


Verify Code   If you cannot see the CheckCode image,please refresh the page again!