When you need to replace PDF text by image in specified page range through command line, this article will be helpful for you. VeryPDF PDF Text Replacer Command Line has such function, it also can help you by text and change text color, font size, font style and others. In the following part, I will show you how to us this software.
- Now this software sells at $79.95 for Single Personal User License, which is perpetual license. When downloading finishes, there will be a zip file. Please extract it to some folder then you can find the executable file in extracted folder.
- When downloading this software, please make sure that your computer is Windows system. If you are Mac user, please try to use the Mac GUI version.
Step 2. Replace text by image in specified page range.
- When you use this software, please refer to the usage and examples.
- Usage: pdftr.exe [options] <Input-file> <Output-file>
pdftr.exe -pagerange 1-3 -oldtext "PDFcamp Printer" -image verypdf_logo.png verypdf.pdf overlayimage_PDFcampPrinter_VeryPDFPrinter.pdf
By this command line, we can replace text of PDFcamp Printer to image of verypdf_logo.png in PDF page from 1 to 3.
pdftr.exe -pagerange 1 -searchandoverlaytext "My Name=><IMAGE>D:\temp\myname.png*20*20" D:\in.pdf D:\out.pdf
By this command line,we can replace text of My Name in original PDF to new IMAGE in the first page. Meanwhile we can specify the image width and height of 20x20.
Now let us check related parameters:
-pagerange <string> : when you need to specify conversion page range for searching keywords or replacing, please add this parameter. And you can use it like this, e.g., 1,3-5,7,9-30.
in PDF by image in specified page range, please refer to the following command line template.
-oldtext <string> : this parameter can help you specify text to be replaced in original PDF file.
-newtext <string> : this parameter is a pair of the last one. By it, we can specify text to replace with in output PDF.
-image <string> : please use this parameter to specify image to replace with, support JPEG, PNG and TIFF
-imgwidth <int> : set width for the new image, unit: pixel, default is 0 for auto, -1 for full image width
-imgheight <int> : set height for the new image, unit: pixel, default is 0 for auto, -1 for full image height
Now let us check the replacing text effect from the following snapshot. I replace text of PDFcamp Printer by image VeryPDF. During the using, if you have any question, please contact us as soon as possible.