Replace text to image in PDF by command line

     In the market, there are lots of software which can be used to replace text by text. But when you need to replace text by image, there are seldom ones which can help you do that.  In this article, I will show you one method of replacing text by image from script. So you can apply this method to replace text from C#, VB, VC and other computer applications.  This method should be processed under the help of software VeryPDF PDF Text Replacer Command Line. If you need to know more about it, please visit its homepage.

Step 1. Download PDF Text Replacer

  • For facilitating uploading and downloading, we have compressed this command line software to zip file. So once downloading finishes, please extract it to some folder then you can check the elements in it.
  • Please make sure download the right version as there are two versions stated on our website.
  • Please run the conversion according to the usage and examples.

Step 2. Replace Text in PDF by Image

  • Please note when you need to replace text by image, make sure the image belongs to the following file formats:JPEG, PNG and TIFF. And you’d better use png image file format. Say if you use image wmf, the replacing process may fail.

Usage:pdftr.exe [options] <Input-file> <Output-file>
Examples

  • When you just simply replace one or a few continuous words to image, please refer to the following command line.
    pdftr.exe -oldtext "Old Text" -image D:\test.png D:\in.pdf D:\out.pdf
  • -oldtext <string>: this parameter is an order to specify text to replace
    -image <string> :this parameter is an order to specify image to replace with, support JPEG, PNG and TIFF
    Now let us make filed practice in the MS Dos Windows. I replace old text PDFcamp Printer to image VeryPDF logo.
    replace text with image

    Now let us check the replacing effect from the following snapshot. The PDFcamp Printer has been replaced with logo image. 
    input PDF and output PDF

  • Now you may ask that can I replace text with image in batch. Say I need to replace two words by one word and one image, can I make it in one command line. The answer is Yes, please refer to the following command line.
    pdftr.exe -searchandoverlaytext "Old Text=>New Text||VeryPDF=>VeryDOC||My Name1=>Your Name|My Name2=><IMAGE>D:\temp\myname.png*20*20" D:\in.pdf D:\out.pdf
    In the above command line, I replace old word VeryPDF to new word VeryDOC, old text My Name1 to new text Your Name and old text My Name2 to image file.

By this above command line, you can replace text in PDF to image by command line. And do the replacement by text and image together. During the using, if you have any question, please contact us as soon as possible.

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!