How to change font name in PDF by command line?

   It is difficult to change font style in PDF file but some times we do need this function. In this article, VeryPDF will share a method about changing font name in PDF by command line.  The tool I use here is VeryPDF PDF Text Replacer Command Line, which can be used to search and replace text with text or image by command line. In the following part, I will show you how to make it.

Step 1. Download PDF Text Replacer Command Line

  • When downloading finishes, there will be a zip file. Please extract it to some folder then you can call the executable file in MS Dos Windows. There is also GUI version of this software, which covers most of the functions of command line version.
  • If you are Mac user, please use the GUI version. Now there is no Linux version available.

Step 2. Change font name in PDF by command line.

  • When you run the conversion, please refer to the usage and examples.
  • Usage:    pdftr.exe [options] <Input-file> <Output-file>
  • When you need to change font name in PDF, please refer to the following command line template.
  • pdftr.exe -searchandoverlaytext "PDFcamp Printer=>PDFcamp Printer" -overlaytextfontname "Verdana" -overlaytextfontsize 80%% -overlaytextcolor FF0000 -overlaybgcolor 00FF00 verypdf.pdf _textoverlay_PDFcampPrinter_VeryPDFPrinter.pdf
    By this software, you can also change font content, font name, font size, font color. When you input the command line, please search text by parameter –searchandoverlaytext, –> the change font content, the content could be  whole paragraph or just a single word, here please pay more attention to the syntax.—> please input the font name after parameter –overlaytextfontname. Then input the full path of input PDF and output PDF file.
    In the example, I also change the font size.
    When you need to change font name, all the Windows system font name could be used by this software. Here are some examples for your reference.
    1. Verdana
    2. Times New Roman
    3. Cyrillic
    4. Greek
    5. Arial

Now let us check related parameters you may use;
-contentreplace <string>      :when you need to replace text in page content objects directly, please add this parameter.
-searchandoverlaytext <string>: when you need to search and overlay text to PDF pages, please add this parameter.
-overlaytextfontname <string> : this parameter can help you set overlay text fontname, default is 'Arial'
  -overlaytextfontsize <string> : it can help you set overlay text font size, default is 0 for auto
  -overlaytextcolor <string>    : when you need to set overlay text color, in Hex, default is 000000
  -overlaybgcolor <string>      : when you need to set overlay text background color, in Hex, default is FFFFFF

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

change font size


 

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

This entry was posted in PDF Text Replacer and tagged , . Bookmark the permalink.

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!