Some issues when I try to search and replace text in PDF file

Hello,

In order to replace a text in PDF file, you may simple run following command line to search and replace text contents,

pdftr.exe -wordbywordfrompdf 1 -replacesubstrings 1 -searchandoverlaytext "2620247009=>262024****" D:\input.pdf D:\_out.pdf

We hope this command line will work better for you.

VeryPDF
--------------------------------------------------
OK. This helped now a lot - see the attached PDF file.

I ask you kindly to answer me these 3 questions:
1) You see that the background color and font size does not match the original attributes [see blue box].
2) I need a further replacements to be performed. Can this be done with one command line call or do I have to call pdftr.exe for each replacement?
3) The modified PDF file is 10-times bigger than the original. Can I do something about this? Compare the attached files.

Customer
--------------------------------------------------

image
>>1) You see that the background color and font size does not match the original attributes [see blue box].

The following command line will work better for you, please run it to try again,

pdftr.exe -wordbywordfrompdf 1 -replacesubstrings 1 -searchandoverlaytext "2620247009=>262024****" -overlaybgcolor F1F1F1 -overlaytextcolor 000000 -overlaytextfontsize 70% D:\test.pdf D:\out.pdf

>>2) I need a further replacements to be performed. Can this be done with one command line call or do I have to call pdftr.exe for each replacement?

Yes, of course, you can replace more texts in one command line, for example,

pdftr.exe -overlaybgcolor trans -searchandoverlaytext "ABC=>DEF||123=>456" D:\in.pdf D:\out.pdf

>>3) The modified PDF file is 10-times bigger than the original. Can I do something about this? Compare the attached files.

Because pdftr.exe will embed some fonts into PDF file, these embedded fonts will increase the size to generated PDF file, however, you can use "-embedfont 0" option to stop embed fonts into PDF file, for example,

pdftr.exe -embedfont 0 -wordbywordfrompdf 1 -replacesubstrings 1 -searchandoverlaytext "2620247009=>262024****" -overlaybgcolor F1F1F1 -overlaytextcolor 000000 -overlaytextfontsize 70% D:\test.pdf D:\out.pdf

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!