PDF Replacement issues, failed to replace text in PDF files

Hi,

I am testing the command line program pdftr.exe and I found these issues when changing 2620247009 to 262024****:

* It writes the previous field with the content 1.53789 to the changed text - blue box in the attached Output.pdf.

* The font is not the same when the text has been changed - red box in the attached Output.pdf.

I attached also the original pdf file Daily_Statement_01-23-2018_01-23-2018_(20247009).pdf.

Is there a chance it can be fixed or is it the general problem when working with PDF?

Kind regards,
Customer
--------------------------------------------------
This is the output:

PS D:\pdftextreplacer_cmd> .\pdftr.exe -contentreplace "2620247009=>262024****" '.\Daily_Statement_01-23-2018_01-23-2018_(20247009).pdf' D:\Output.pdf

[Message] Trial version has some restrictions, please purchase full version to remove the restrictions.
[Message] You have 91 times to evaluate this software, you may purchase a full version from "https://www.verypdf.com" web site.
[Message] Try to replace text in page contents...
[ReplaceText] 2620247009=>262024****
[ContentParserExport] Processing page 1 of 2...
[Message] Output to "C:\Users\admin\AppData\Local\Temp\vpdf-4020-1516846636-19564-2.txt" file.
[Not Found in] 'VeryPDF Software Demo Version (https://www.verypdf.com)'
[Not Found in] 'VeryPDF Software Demo Version (https://www.verypdf.com)'
[Message] Open "C:\Users\admin\AppData\Local\Temp\vpdf-4020-1516846636-19564-2.txt" file.
[ContentParserExport] Processing page 2 of 2...
[Message] Output to "C:\Users\admin\AppData\Local\Temp\vpdf-4020-1516846636-20204-3.txt" file.
[Not Found in] 'VeryPDF Software Demo Version (https://www.verypdf.com)'
[Not Found in] 'VeryPDF Software Demo Version (https://www.verypdf.com)'
[Message] Open "C:\Users\admin\AppData\Local\Temp\vpdf-4020-1516846636-20204-3.txt" file.
[Warning] Failed to search keywords in PDF pages, we will switch to 'overlay' mode to try again.
[Message] Try to replace text by overlay mode...
[ReplaceText] 2620247009=>262024****
[ContentParserExport] Processing page 1 of 2...
[Found and Overlay] [INFO] We will find '2620247009' and overlay with '262024****'...
[Found and Overlay] '1.53789 2620247009'=>'1.53789 262024****'
[Found and Overlay] '1.53789 2620247009'=>'1.53789 262024****'
[Found and Overlay] '2620247009'=>'262024****'
[Found and Overlay] '2620247009'=>'262024****'
[ContentParserExport] Processing page 2 of 2...
[Found and Overlay] [INFO] We will find '2620247009' and overlay with '262024****'...
[Found and Overlay] [INFO] Nothing was found for '2620247009'...
[Message] Create "D:\Output.pdf" file successful.

Customer
--------------------------------------------------
https://www.verypdf.com/app/pdf-text-replacer/search-and-replace-pdf-text-command-line.html#pdftr
https://www.verypdf.com/dl2.php/pdftextreplacer_cmd.zip

We suggest you may use "-searchandoverlaytext" to instead of "-contentreplace" to try again, for example,

.\pdftr.exe -searchandoverlaytext "2620247009=>262024****" .\Daily_Statement_01-23-2018_01-23-2018_(20247009).pdf D:\Output.pdf

Will you work better with "-searchandoverlaytext" option?

VeryPDF
--------------------------------------------------
Unfortunately your suggestion didn't change anything - see the attached pdf sample.

It finds always the preceding text [1.53789].

This is the output:
PS D:\pdftextreplacer_cmd> .\pdftr.exe -searchandoverlaytext "2620247009=>262024****" '.\Daily_Statement_01-23-2018_01-23-2018_(20247009).pdf' D:\Output.pdf

[Message] Trial version has some restrictions, please purchase full version to remove the restrictions.
[Message] You have 87 times to evaluate this software, you may purchase a full version from "https://www.verypdf.com" web site.
[Message] Try to replace text by overlay mode...
[ReplaceText] 2620247009=>262024****
[ContentParserExport] Processing page 1 of 2...
[Found and Overlay] [INFO] We will find '2620247009' and overlay with '262024****'...
[Found and Overlay] '1.53789 2620247009'=>'1.53789 262024****'
[Found and Overlay] '1.53789 2620247009'=>'1.53789 262024****'
[Found and Overlay] '2620247009'=>'262024****'
[Found and Overlay] '2620247009'=>'262024****'
[ContentParserExport] Processing page 2 of 2...
[Found and Overlay] [INFO] We will find '2620247009' and overlay with '262024****'...
[Found and Overlay] [INFO] Nothing was found for '2620247009'...
[Message] Create "D:\Output.pdf" file successful.

Customer
--------------------------------------------------
You may run following command line to try again,

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

This is the screenshot of replacement in both input and output PDF files,

PDF Replacement issues, failed to replace text in PDF files

We hope this command line will work better for you.

VeryPDF

See Also:

https://www.verypdf.com/wordpress/201409/pdf-text-replacer-is-not-working-how-to-replace-text-in-pdf-files-programmatically-replace-text-in-all-pages-of-a-pdf-document-best-find-search-and-replace-text-in-pdf-software-40994.html

Related Posts