How to replace text in PDF file with Embedded Subset Fonts?


Attached you can find the example. I wrote the document with word 2013 and printed it with pdfcreator. I know that there are many pdf printers available, but we need to use pdfcreator for several reasons. Switching to another pdf printer is only the last option.

The command i used is,

pdftr.exe -contentreplace "text=>test" test.pdf _textreplace_test.pdf

For some reason overlay works, but "-contentreplace" fails. Overlay is a good option, but "-contentreplace" would be better on many situations.

I hope you can help, so we can use your text replace tool for our needs.

We have checked your PDF file, your PDF file contains Embedded Subset font, please look at following screenshot,


this PDF file doesn't contain any valid text contents, the following picture does show the contents of the PDF page, as you see, the characters are become the garbage characters, so it is impossible to replace text contents in PDF page with "-contentreplace" option,


so you have to use "-searchandoverlaytext" option to replace text in this PDF file, for example,

pdftr.exe -searchandoverlaytext "text=>test" -overlaytextfontsize 10 D:\dow
nloads\test.pdf D:\downloads\test2.pdf

You can use above command line to replace "text" to"test" in this PDF file correctly.



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!