In this article, I will show you a method of highlighting text in PDF by VeryPDF PDF Text Replacer, which can help you replace PDF text with text and image. In the following part, I will show you how to make it work.in batch. Under this method, you can do text highlighting in PDF from application Visual C++, Visual Basic, etc.. I use software
- There are two versions stated on the website: GUI version and version. Here I will take the version for example.
- When downloading finishes, there will be a zip file in downloading folder. Please extract it to some folder then you can check elements in it and call executable file in MS Dos Windows.
- There are many bat files in extracted folder, simply click them then you can check software working effect.
Step 2. Highlight text in PDF by command line
- When you run the conversion, please refer to the usage and examples in readme.txt.
- Usage: pdftr.exe [options] <Input-file> <Output-file>
- Here one example of highlighting text for your reference.
pdftr.exe -searchandoverlaytext "PDFcamp Printer=>PDFcamp Printer" -overlaytextfontname "Verdana" -overlaytextfontsize 80%% -overlaytextcolor FF0000 -overlaybgcolor 00FF00 verypdf.pdf te.pdf
When you run the conversion, please obey the rules and examples as above or else the highlighting process may fail.
The principle of this software is that searching font needed highlighting in whole PDF file and then set highlighting fonts color. In put the full path of input PDF and then output PDF file path.
By this software and this function, even if you need to in PDF in hundreds of pages PDF file, it can finish in a few seconds and show all the replacing information in MS Dos Windows. Now let us check one example from the following MS Dos working snapshot.
-searchandoverlaytext <string>: use this parameter to search and overlay text to PDF pages
-overlaytextfontname <string> :this parameter can help you set overlay text font name, default is 'Arial'
-overlaytextfontsize <string> : use this parameter to set overlay text font size, default is 0 for auto
-overlaytextcolor <string> : when you need to change replace text color, please add this parameter. Set overlay text color, in Hex, default is 000000
-overlaybgcolor <string> :different with last one, this parameter is for setting overlay text background color, in Hex, default is FFFFFF.
Now let us check the highlighting text effect from the following snapshot. During the using, if you have any question, please contact us as soon as possible.