Detail are in attached text file along with sample command line used to produce pdf.
pdftr.exe -contentreplace "7094-054=>28580-004" -overlaytextfontsize 150% -overlaybgcolor 09F0F9 -overlaytextcolor 000000 T:\copyCovers\pdfOut\28580\28580-004.pdf T:\copyCovers\pdfOut\28580\tempworkspace\28580-001.pdf
This is the command line copied from debugger athat is fed to a shell command and was used to produce the attached pdf.
Behaviour and results are the same when this command line is paste into command prompt instead of being passed to shell by executable
The fontsize arg was added to compensate for the bgcolor issues in email that our the real issue attempting to solve ourselves we have tried both -searchandoverlaytext and -contentreplace originally using default color args and now specified hex colors.
Used in production on my dev machine several hundred pdfs printed useable but problematic all with same 2 issues in subject line. This is Windows 10 but if resolved on test/dev box factory floor runs both Win 7 and 10.
Executable that shells to pdftr is old vb6 program that calls your app, but We see no difference between running program produced command lines via shelling or pasting same into a command line prompt, Pdfs produced over past 10 years from jpegs assembled by MS publisher automation.
We have added a new parameter of "-overlaybgwidth" in the new version to you, please download the new version from this URL,
after you download it, you can run following command line to replace the text in your PDF file properly,
pdftr.exe -contentreplace "28580<AD>004=>XXXXX-XXX" -overlaytextfontsize 150% -overlaybgwidth 140% -overlaybgcolor FF0000 -overlaytextcolor 0000FF D:\downloads\28580_004.pdf D:\downloads\28580_004-2.pdf
You can use "-overlaybgwidth" and "-overlaybgheight" options to control the width and height of background color block easily.