How to change date, or data in PDF in batch?

Question: I need to update data in PDF in batch.  I will put these PDF names & modified dates in a table and hyperlink them so the user can display the PDF. Of course I can place the names and modified dates in the table manually but then each time the PDF is updated I would have to change the modified date in the table manfully. Is there any solution on VeryPDF?Thanks for any input.

Answer: According to your needs, you can have a free trial of software VeryPDF PDF Text Replacer Command Line. By this software, you can change change data in PDF file by command line in batch. In the following part, I will show you how to use this software.

Step 1. Download PDF Text Replacer Command Line

  • When downloading finishes, please unzip it and extract it to some folder. Then please check the elements in it and call the executable file in MS Dos Windows.
  • When you use this software, please refer to the usage and examples.

Step 2. Change data in PDF by command line in batch

  • Here is the usage and examples for your reference.
  • Usage:      pdftr.exe [options] <Input-file> <Output-file>
  • When you need to change data, date in PDF, please refer to the following command line templates.
  • pdftr.exe -contentreplace "04/23/2013=>05/29/2014" D:\in.pdf D:\out.pdf
    When you need to change data directly, please use this command line.
    pdftr.exe -searchandoverlaytext "ZR0051203=>MW77906" D:\in.pdf D:\out.pdf
  • pdftr.exe -overlaytextfontname "Arial" -overlaytextcolor FF0000 -overlaybgcolor 00FF00 - searchandoverlaytext "Old Text=>New Text||VeryPDF=>VeryDOC||My Name=>Your Name" D:\in.pdf D:\out.pdf
    This command line is a little complicated as here you can specify the replace fonts style as Arial, color is red, and change many pairs of data  in one command line.

  • When you need to change data in batch, here are some more examples of writing bat files.
  • for %F in (D:\temp\*.pdf) do pdftr.exe -contentreplace "My Name=>Your Name" "%F" "out_%~nF.pdf"
    for %F in (D:\temp\*.pdf) do pdftr.exe -searchandoverlaytext "My Name=>Your Name" "%F" "C:\test\% ~nF.pdf"
    for %F in (D:\temp\*.pdf) do pdftr.exe -skip "%F" "C:\test\%~nF.pdf"
    for /r D:\temp %F in (*.pdf) do pdftr.exe -oldtext "Old Text" -newtext "New Text" "%F" "C:\test\% ~nF.pdf"

  • When you need to add a layer and then change the data, please use this command line.
    When you use this software, please pay more attention to the syntax as it is a little complicated and stick, once there is some error, then changing process will fail.  And there is another benefit when you use the second mode of changing data as you can specify the changed font size, style color and others.

Now let us check the related parameters:
-contentreplace <string>      : replace text in page content objects directly
  -searchandoverlaytext <string>: search and overlay text to PDF pages
  -overlaytextfontname <string> : set overlay text fontname, default is 'Arial'
  -overlaytextfontsize <string> : set overlay text font size, default is 0 for auto
  -overlaytextcolor <string>    : set overlay text color, in Hex, default is 000000
  -overlaybgcolor <string>      : set overlay text background color, in Hex, default is FFFFFF

Now let us check the replaced effect from the following snapshot. During the using, if you have any question, please contact us as soon as possible.

change data effect

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!