I need text replacement without affecting background (background to be transparent) and not changing font-size or font, how can I do it?

Hi!

I'm interested in buying your software - PDF Text Replacer Command Line, but I need text replacement without affecting background (background to be transparent) and not changing font-size or font. Is it possible?

Thank you
Customer
-------------------------------------------
Yes, that's possible, could you please send to us a sample PDF file for test purpose? after we check your sample PDF file, we will figure out a solution to you asap.

In general, you can use "-contentreplace" option to replace text on PDF pages, "-contentreplace" option doesn't affect the text color and background color or background image,

pdftr.exe -contentreplace "My Name=>Your Name" D:\in.pdf D:\out.pdf

however, if your PDF file is using a custom font, such as type3 font, or a special embedded font with customized character set, "-contentreplace" option will fail to find the text in the PDF pages, for these PDF files, you should better use "-searchandoverlaytext" option, "-searchandoverlaytext" option has more powerful text search function, you may use "-searchandoverlaytext" option with below command lines,

image

pdftr.exe -searchandoverlaytext "Saturday, March 5,=>Friday, March 4,<BGCOLOR>FF0000||Saturday, March 5th=>Friday, March 4th<BGCOLOR>0003C6" -overlaytextcolor FFCC00 test-background-color.pdf _test-background-color.pdf

image

pdftr.exe -replacesubstrings 0 -overlaybgcolor trans -searchandoverlaytext "Saturday, March 5,=>VeryPDF.com||Saturday, March 5th=>VeryDOC.com" -overlaytextcolor FFCC00 test-background-color.pdf _test-background-color2.pdf

image

pdftr.exe -replacesubstrings 0  -searchandoverlaytext "Saturday, March 5,=>VeryPDF.com||Saturday, March 5th=>VeryDOC.com" -overlaytextcolor FFCC00 test-background-color.pdf _test-background-color4.pdf

image

pdftr.exe -replacesubstrings 0 -searchandoverlaytext "Saturday, March 5,=>VeryPDF.com<BGCOLOR>FF0000||Saturday, March 5th=>VeryDOC.com<BGCOLOR>0003C6" -overlaytextcolor FFCC00 test-background-color.pdf _test-background-color3.pdf

image

But "-searchandoverlaytext" option will use a rectangle with white color to cover the original text contents, so if original text contents are not on the white background color, you will see a white rectangle below the new text contents, like the below image,

image

If you need to replace a text which on the complicated background, you may send that PDF file to us for test purpose, we will figure out a solution to you asap.

VeryPDF

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!