pdf text replacer

How to replace short sentence in PDF file by pdftr.exe application?

VeryPDF has released a new version of PDF Text Replacer Command Line software today, the new version works better to replace sub-string in a long text string in PDF file, the new version of pdftr.exe can be downloaded from below URL,

https://www.verypdf.com/dl2.php/pdftextreplacer_cmd.zip

after you download and unzip it to a folder, you can use following command lines to replace dates in your PDF file easily, because the old date may appear in some long text strings, so the new version of pdftr.exe will replace these old date in long text strings directly,

pdftr.exe -wordbywordfrompdf 0 -replacesubstrings 1 -overlaytextfontname "Times New Roman" -overlaybgcolor FF0000 -overlaytextfontsize 10 -overlaybg-y-offset 4 -overlaybgheight 18 -searchandoverlaytext "August 19, 2022=>September 9, 2022" test-modify-dates.pdf _out_test-modify-dates.pdf

OR

pdftr.exe -wordbywordfrompdf 0 -replacesubstrings 0 -overlaytextfontname "Times New Roman" -overlaybgcolor FF0000 -overlaytextfontsize 10 -overlaybg-y-offset 4 -overlaybgheight 18 -searchandoverlaytext "August 19, 2022=>September 9, 2022" test-modify-dates.pdf _out_test-modify-dates.pdf

"-replacesubstrings 1" will replace entire text line which contain old text.

"-replacesubstrings 0" will replace old text only in a long string, it doesn't affect other words in this long string.

This is a screenshot of "-replacesubstrings 1", as you see, the entire text file has been replaced,

image

This is a screenshot of "-replacesubstrings 0", as you see, only the old text was replaced, the other words were kept same, same font, same color, etc.

image

So, if you want to replace text in a PDF file from command line or automatically, PDF Text Replacer Command Line software is a good choice for you, you may download and try it now.

https://www.verypdf.com/app/pdf-text-replacer/try-and-buy.html#buy-cmd

VN:F [1.9.20_1166]
Rating: 0.0/10 (0 votes cast)
VN:F [1.9.20_1166]
Rating: 0 (from 0 votes)
pdf toolbox command line

How to convert from fillable PDF file to non-fillable PDF file and keep original high quality?

The software we are using we have found the bookmark option to get bookmarks added so that's not an issue.

The issue is we populate fillable pdf's with details and then merge the pages into 1 pdf. When the pdf's are merged together the fillable boxes can still be modified. We were wondering if when merging the documents it could also flatten them so the fillable boxes go away and cannot be modified.

Thanks,
Customer
------------------------------------------
Yes, this is possible, you can use VeryPDF PDF Toolbox Command Line software to flatten all fillable forms into non-fillable forms, please look at following web page for more information,

https://www.verypdf.com/wordpress/201302/how-to-flatten-fillable-pdffill-pdf-with-command-line-34649.html

image

VeryPDF PDF Toolbox Command Line can be downloaded from this web page,

https://www.verypdf.com/app/pdftoolbox/index.html
https://www.verypdf.com/dl.php?file=pdftoolbox_cmd_win.zip

after you download it, you can run following command line to convert from fillable PDF file to non-fillable PDF file easily,

pdftoolbox.exe "sample_fillform.pdf" -outfile "_flattenform_out.pdf" –flattenform

image

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)
pdf text replacer

How to batch replace date strings in PDF pages?

I ran this script for my test file that have date changes for footers on page 2 and the remainder of the document. The footer font Times Roman 10.

I ran this script:

for %F in (C:\Test\*.pdf) do pdftr.exe -overlaytextfontname "Times New Roman" -overlaytextfontsize 10 -overlaybg-y-offset 4 -overlaybgheight 18 -contentreplace "August 19, 2022=>September 9, 2022" "%F" "C:\Test\Output\%~nF_out.pdf"

It change the date from August 19, 2022 to September 9, 2022 in the footers on page 3 and beyond, but did not change the August date on page 2.

Attached is the test input pdf file. The next msg will include the result pdf file.

Here is the command line execution results below:

C:\PDF Tool\pdftextreplacer_cmd>for %F in (C:\Test\*.pdf) do pdftr.exe -overlaytextfontname "Times New Roman" -overlaytextfontsize 10 -overlaybg-y-offset 4 -overlaybgheight 18 -contentreplace "August 19, 2022=>September 9, 2022" "%F" "C:\Test\Output\%~nF_out.pdf"

C:\PDF Tool\pdftextreplacer_cmd>pdftr.exe -overlaytextfontname "Times New Roman" -overlaytextfontsize 10 -overlaybg-y-offset 4 -overlaybgheight 18 -contentreplace "August 19, 2022=>September 9, 2022" "C:\Test\Test1-Original.pdf" "C:\Test\Output\Test1-Original_out.pdf"
[Message] Working in "Evaluation" mode1.
[Message] Trial version has some restrictions, please purchase full version to remove the restrictions.
[Message] You have 138 times to evaluate this software, you may purchase a full version from "http://www.verypdf.com" web site.
[Message] Working in "Evaluation" mode.
[Message] Try to replace text in page contents...
[ReplaceText] August 19, 2022=>September 9, 2022
[ContentParserExport] Processing page 1 of 4...
[ContentParserExport] Processing page 2 of 4...
[ContentParserExport] Processing page 3 of 4...
[OK, Found and Replaced] 'August 19, 2022'=>'September 9, 2022'
[Not Found in] 'Page '
[ContentParserExport] Processing page 4 of 4...
[OK, Found and Replaced] 'August 19, 2022'=>'September 9, 2022'
[Not Found in] 'Page '
[Message] Replaced '2' keywords.
[Message] Create "C:\Test\Output\Test1-Original_out.pdf" file successful.

Thank you,
Customer

---------------------------------------------------------

VeryPDF PDF Text Replacer Command Line (pdftr.exe),

https://www.verypdf.com/app/pdf-text-replacer/search-and-replace-pdf-text-command-line.html

https://www.verypdf.com/app/pdf-text-replacer/try-and-buy.html#buy-cmd

image

From log message, the page 1 and page 2 are not contain "August 19, 2022" keyword, software will show "[OK, Found and Replaced]" for each found keyword, it only found keyword on page 3 and page 4,

--------------------------
[ReplaceText] August 19, 2022=>September 9, 2022
[ContentParserExport] Processing page 1 of 4...
[ContentParserExport] Processing page 2 of 4...
[ContentParserExport] Processing page 3 of 4...
[Message] Output to "C:\Users\Dlehman\AppData\Local\Temp\vpdf-86520-1661262381-3599-3.txt" file.
[OK, Found and Replaced] 'August 19, 2022'=>'September 9, 2022'
[Not Found in] 'Page '
[ContentParserExport] Processing page 4 of 4...
[Message] Output to "C:\Users\Dlehman\AppData\Local\Temp\vpdf-86520-1661262381-3104-4.txt" file.
[OK, Found and Replaced] 'August 19, 2022'=>'September 9, 2022'
[Not Found in] 'Page '
[Message] Replaced '2' keywords.
[Message] Create "C:\Test\Output\Test1-Original_out.pdf" file successful.
--------------------------

You may use "-listtext" parameter to check what text included in page 1 and page 2, for example,

pdftr.exe -listtext D:\Downloads\Test_Doc_with_dates.pdf
===== Search keyword in page 1 =====
[95.86, 161.43, 104.15, 177.62] 'August 19, 2022'
[72.00, 744.84, 79.22, 758.31] 'August 19, 2022'
[513.06, 744.84, 518.62, 758.31] 'Page 1'
===== Search keyword in page 2 =====
[152.83, 204.18, 159.50, 217.83] 'August 19, 2022'
[72.00, 744.84, 79.22, 758.31] 'August 19, 2022'
[513.06, 744.84, 518.62, 758.31] 'Page 2'

If you still can't get it work, please send to us your new PDF file and your Order ID for pdftr.exe, we will work on this problem and figure out a solution to you asap.

VeryPDF
---------------------------------------------------------
btw, I noticed you are using "-contentreplace" parameter, please change it to "-searchandoverlaytext" to try again, for example,

pdftr.exe -overlaytextfontname "Times New Roman" -overlaytextfontsize 10 -overlaybg-y-offset 4 -overlaybgheight 18 -searchandoverlaytext "August 19, 2022=>September 9, 2022" "C:\Test\Test1-Original.pdf" "C:\Test\Output\Test1-Original_out.pdf"

Can you get it work fine with "-searchandoverlaytext" parameter?

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)
verypdf sdk & com

TextFileWithPosition Word Records Containing Unprintable Characters with PDF Extractor Command Line software

To whom it may concern,

In using your PDF to Any Converter, we have found a particular PDF which contains some spurious data. This data is obvious when copying all text from the PDF in a reader such as Acrobat Reader. The nature of the PDF is sensitive so I cannot provide it, if deemed necessary then I can look to attempt to sanitise it before passing on but I would prefer to start by explaining the behaviour we are seeing.

Although the PDF contains spurious data, the visuals appear correct in a PDF reader. When the converter is called, the resultant TextFileWithPosition contains unprintable characters in the word records. Is there a reason that these are included in the file? Typically unprintable characters such as CR and LF characters will be ignored by the application and only readable words appear in the words records. Their presence in the PDF will simply mean that words are split into separate word records, for example:

[Page #1] *** initial words ***
word: x=48.24..65.24 y=70.87..85.77 base=82.46 fontSize=11.04 rot=0 link=00000000 'This'
word: x=48.24..55.29 y=86.59..101.49 base=98.18 fontSize=11.04 rot=0 link=00000000 'Is'
word: x=48.24..55.56 y=102.31..117.21 base=113.90 fontSize=11.04 rot=0 link=00000000 'A'
word: x=48.24..66.27 y=118.03..132.93 base=129.62 fontSize=11.04 rot=0 link=00000000 'Test'
word: x=224.75..265.75 y=81.42..94.02 base=91.20 fontSize=13.43 rot=0 link=00000000 '

image

Please see a sanitised snippet of the output in question attached. Note the presence of 0A, 0B, 0C and 0D characters.

Kind regards,
Customer
-----------------------------------------
VeryPDF PDF to Any Converter,

https://www.verypdf.com/app/pdf-to-any-converter/index.html

VeryPDF PDF Extract Tool Command Line,

https://www.verypdf.com/app/pdf-extract-tool/index.html

Thanks for your message, in general, these special characters are caused by a subset embedded font or special character set which embedded in the PDF file itself, the "visual" correct in Adobe Reader is because the font data of this character has been embedded into PDF file itself, but PDF just use a glyph index to use this character, it is impossible to get the original unicode from the glyph index, this is the reason of this problem.

Uncode is the real text of a character in font data.

Glyph Index is the serial number of this character in the font data, the first character is 0, the second character is 1, the third character is 2, etc.

Below is a screenshot of Arial.ttf font,

image

If possible, you may remove confidential information from that PDF file, send to us the new PDF file without confidential information and keep the "bad" character only, if so, we will able to research this problem quickly.

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)
pdf editor, pdf split-merge

How to insert bookmarks into PDF files?

Hello,

Earlier this year we had purchased the pdf Split Merge software. We have been adding it to our system and we have 1 question about this software. Is it possible once the pdf's are merged and the bookmarks are added to flatten the pdf's? We're noticing when using ghostscript it would flatten the pdf's so the fillable boxes couldn't be changed later but we're not able to figure out how to do the same with this software.

VeryPDF PDF Split-Merge,
https://www.verypdf.com/app/pdf-split-merge/index.html

Thanks,
Customer
------------------------------
Thanks for your message, PDF Split-Merge software is focus on PDF Split and Merge functions, it doesn't support bookmark inserting function. However, if this function important to you, we can develop a custom-build version of PDF Split-Merge Command Line software with "Insert bookmarks into PDF file" function, this version allows you to insert multiple levels and unlimited bookmarks into merged PDF file, you can run it from command line with various parameters easily.

btw, if you are using GUI version and wants to insert bookmarks by manual, we suggest you may download VeryPDF PDF Editor software from this web page to try, you can use VeryPDF PDF Editor software to add, delete, edit, import and export PDF bookmarks easily,

https://www.verypdf.com/app/pdf-editor/index.html

image

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)