pdf text replacer

Batch replace text contents in PDF files in sub-folders (loop through directory and subdirectories)

I used the trial "VeryPDF PDF Text Replacer Command Line (pdftr.exe)". I have noticed some constraints that it does not like long path names to the .pdf file to do the content replace. One folder down it worked. I am not sure it can do multiple folders down.

I am looking to change multiple pdf files to replace "August 19, 2022" to "September 9, 2022" that are in multiple subfolders. What is the command line batch to execute this with the command line?

Also, I want to keep the font type and size the same as the "August 19, 2022" when replace with "September 9, 2022" with the batch command line script.

What is the command to keep the replacement text the same font and size as the original text?

The body is Arial 12 and the footer is Times Roman 10.

Thank you,

David
------------------------------------
VeryPDF PDF Text Replacer Command Line (pdftr.exe)

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


>>What is the command to keep the replacement text the same font and size as the original text?
>>The body is Arial 12 and the footer is Times Roman 10.

Because your PDF file is using embedded subset font, it's impossible to use original font in PDF file, we have to use a new "Times New Roman" or "Arial" font from Windows system, so we have to use same font for same text, you may run following command line to use "Times New Roman" font and 10 font size,

pdftr.exe -overlaytextfontname "Times New Roman" -overlaytextfontsize 10 -overlaybg-y-offset -4 -overlaybgheight 12 -searchandoverlaytext "August 19, 2022=>September 9, 2022" D:\Downloads\Test_Doc_with_dates.pdf D:\Downloads\out.pdf

image

If you want to process all PDF files in a folder and its sub-folders, e.g., D:\temp folder and its sub-folders, you can run following command line,

for %F in (D:\temp\*.pdf) do pdftr.exe -overlaytextfontname "Times New Roman" -overlaytextfontsize 10 -overlaybg-y-offset -4 -overlaybgheight 12 -searchandoverlaytext "August 19, 2022=>September 9, 2022" "%F" "%~dpnF-out.pdf"

Thank you.
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, pdfstamp command line

How to use wildcard characters to remove text stamps or bates numbers in PDF pages?

Hi there,

I have a pdf file (with multiple pages) carrying stamps created by 3rd party software application.

Each stamp has a prefix: TRM-, for example TRM-Doc001, TRM-Doc002 ....

Can I use your command line tool (pdfstamp.exe) to remove all the stamps with the said prefix (that is 'TRM-')? This function is very import to our operation.

https://www.verypdf.com/app/pdf-stamp/try-and-buy.html

Separately, is there a cmd tool that can tell on which page the said stamps are located? For example, 'TRM-Doc001 was found on page 2'.

Many Thanks!
Customer
---------------------------------

>>Can I use your command line tool (pdfstamp.exe) to remove all the stamps with the said prefix (that is 'TRM-') ? This function is very import to our operation.

Sorry, PDFStamp Command Line software hasn't this function, we have a "VeryPDF PDF Text Replacer Command Line (pdftr.exe)" software, but pdftr.exe can only remove static text contents, it can't remove "TRM-?" dynamic text contents, you may download the trial version of "VeryPDF PDF Text Replacer Command Line (pdftr.exe)" software from following web page to try,

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

We are planning to support wildcard characters in the future version of pdftr.exe, this new function will allow you to remove "TRM-?" dynamic text contents and bates numbers, if you are interested in this solution, please feel free to let us know.

The current version of pdftr.exe support only static text contents, for example,

pdftr.exe -contentreplace "TRM-Doc001=>" D:\in.pdf D:\out.pdf
pdftr.exe -contentreplace "TRM-Doc002=>" D:\in.pdf D:\out.pdf
pdftr.exe -contentreplace "TRM-Doc003=>" D:\in.pdf D:\out.pdf

pdftr.exe -contentreplace "TRM-Doc004=>" D:\in.pdf D:\out.pdf

But in future version of pdftr.exe application, we will support "TRM-?" wildcard to remove dynamic text contents and bates numbers, for example,

pdftr.exe -contentreplace "TRM-?=>" D:\in.pdf D:\out.pdf

"TRM-?" will match all keywords which start from "TRM-", such as,

TRM-Doc001
TRM-Doc002
TRM-Doc003
TRM-Doc004
TRM-Doc001XXYYHK
TRM-Test

and so on.


>>Separately, is there a cmd tool that can tell on which page the said stamps are located? For example, 'TRM-Doc001 was found on page 2'

You can use "VeryPDF PDF Text Replacer Command Line (pdftr.exe)" software to check if a PDF page contains a text or not, for example,

-pagerange <string> : set page range for search keywords, e.g., 1,3-5,7,9-
-opw <string> : owner password (for encrypted files)
-upw <string> : user password (for encrypted files)
-listtext : list text lines in all PDF pages or selected pages
-searchtext <string> : search text in PDF pages and show result to console
-searchtext2 <string> : search text in PDF pages, output one word by one word

pdftr.exe -listtext C:\in.pdf
pdftr.exe -searchtext "string" C:\in.pdf
pdftr.exe -searchtext2 "string" C:\in.pdf
pdftr.exe -pagerange 1 -searchtext "string" C:\in.pdf

for example,

pdftr.exe -searchtext "VeryPDF" test.pdf

image

pdftr.exe -searchtext2 "VeryPDF" test.pdf

image

If pdftr.exe can't 100% meet your requirements, we can provide a custom-build version of pdftr.exe application to best meet your requirements, please feel free to let us know if you have any questions, thank you.

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

VeryPDF PDF Text and Replace failed to replace date in PDF file

VeryPDF PDF Text and Replace trial version did not work changing date from August 19, 2022 to September 9, 2022 in 3 pdf documents. The August 19, 2022 date remained after conversion.

Ran the trial version of the tool to change date from August 19, 2022 to September 9, 2022, but it did not change the August 19, 2022 in the attached PDF in the document body or in the footer.

Attached is the test pdf file v2 after running through the tool. 

Customer
------------------------------
Sorry for this matter, we suggest you may download "VeryPDF PDF Text Replacer Command Line (pdftr.exe)" from following web page to try, "VeryPDF PDF Text Replacer Command Line (pdftr.exe)" software will work fine to you,

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

after you download and unzip it to a folder, you can run following command line to show text contents and replace text contents easily,

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'

pdftr.exe -contentreplace "August 19, 2022=>September 9, 2022" D:\Downloads\Test_Doc_with_dates.pdf D:\Downloads\out.pdf

[ReplaceText] August 19, 2022=>September 9, 2022
[ContentParserExport] Processing page 1 of 2...
[Found and Overlay] [INFO] We will find 'August 19, 2022' and overlay with 'September 9, 2022'...
[Found and Overlay] 'August 19, 2022'=>'September 9, 2022'
[Found and Overlay] 'August 19, 2022'=>'September 9, 2022'
[ContentParserExport] Processing page 2 of 2...
[Found and Overlay] [INFO] We will find 'August 19, 2022' and overlay with 'September 9, 2022'...
[Found and Overlay] 'August 19, 2022'=>'September 9, 2022'
[Found and Overlay] 'August 19, 2022'=>'September 9, 2022'
[Message] Create "D:\Downloads\out.pdf" file successful.

The August 19, 2022 has been changed to September 9, 2022 in the final PDF file, you may double check the final PDF file.

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)
docprint pro, hookprinter

How to intercept print jobs and convert pages into xml files?

I'd like to intercept print jobs and convert pages into xml files, how to do the Print Jobs to XML Conversion works?

Customer
---------------------------
Do you want to capture the print jobs from Windows system? if yes, we suggest you may download following products from our website to try, we hope these products will useful to you,

>>How to get VeryPDF/VeryDOC (HookPrinter) Printer Capturer?

Thanks for your message, we have more types of Printer Capturer software, you can use these software to capture the print jobs to PDF files, and then forward the print jobs to another Windows Printer, you can download and test these software from following URLs,

Solution 1. VeryPDF HookPrinter SDK

With VeryPDF HookPrinter SDK software, you can capture printer output that would normally go to a communications port such as LPT1. Useful for second stage processing such as creating PDF files, ripping, or distribution of printer output.

image

You can download and test VeryPDF HookPrinter SDK from following web page,

http://www.verypdf.com/app/hookprinter/index.html
http://www.verypdf.com/dl2.php/HookPrinter.zip

Please refer to user manual of VeryPDF HookPrinter SDK from this web page,

http://www.verypdf.com/app/hookprinter/user-guide.html


Solution 2. VeryPDF docPrint Pro with HookPrinter (Printer Capturer)

VeryPDF docPrint Pro v8.0 contains two virtual printers and a HookPrinter (Printer Capturer) module, after you install docPrint Pro v8.0 software, you will see two virtual printers appear in the Printer & Fax folder in your Windows system, you can run following command line to install or uninstall HookPrinter (Printer Capturer) module,

"C:\Program Files (x86)\docPrint Pro v8.0\artprint.exe" -hookprinter

image

After you enable HookPrinter (Printer Capturer) Module, you can print a document to any of your Windows printers (except for docPrint, because docPrint is used for an intermediate printer).

HookPrinter (Printer Capturer) will work by following steps,

1. You are enable HookPrinter (Printer Capturer) Module first, print a document to "HP LaserJet Professional P1108" or other printers,
2. HookPrinter (Printer Capturer) Module captures this print job, redirect it to docPrint virtual printer,
3. HookPrinter (Printer Capturer) Module also convert this print job to PDF, EMF, WMF, TIFF, PNG, JPG formats and save to predefined folder according to configuration parameters,
4. docPrint virtual printer receives this print job, it does convert this print job to PDF, PS, EPS, TIF, JPG, PNG, BMP, GIF, etc. formats first, and then forward this print job to original printer ("HP LaserJet Professional P1108" or other printers) continue,
5. OK, the original printing process does continue and without any interruption, but the print job be converted to PDF, PS, EPS, TIF, JPG, PNG, BMP, GIF, etc. formats and save to predefined folder,

You can download docPrint Pro v8.0 with HookPrinter (Printer Capturer) from this web page for evaluation,

http://www.verypdf.com/artprint/docprint_pro_setup.exe

Please by following steps to test "-hookprinter" option,

1. Download and install docPrint Pro v8.0 version,

2. Run following application to set Printer Capturer options,

"C:\Program Files (x86)\docPrint Pro v8.0\artprint.exe" -hookprinter

* You need set "Output folder" to save captured documents.
* You need click "Install HookPrinter" button to install Printer Capturer.
* You need click "Save&Close" button to close this dialog, and print a document to an arbitrary Windows Printer, you will get captured documents appear in predefined folder automatically.

3. OK.

"-hookprinter" option will capture everything that you sent to any Windows Printer. If you want just print a document to docPrint first, and then forward to other printers, you can use "-forwardprinter" option, for example,

"C:\Program Files (x86)\docPrint Pro v8.0\artprint.exe" -forwardprinter

image

After you set the options, click "Save&Close" button to close the setting dialog, when an user print a document to docPrint, docPrint will process the print job first, and then redirect the print job to predefined printer (or associated printer) automatically.

"-hookprinter" and "-forwardprinter" are two total different printer capture and forwarding methods, you can choose either one according to your requirements.


Solution 3. Print a document to docPrint or docPrint PDF Driver (Included in Solution 2) and save to a new PDF or image or other formats.

This solution is simple, after you install the docPrint Pro software (Included in Solution 2), you will see two printers appear in the Printer&Fax folder, docPrint and docPrint PDF Driver. You can simple print a document to docPrint or docPrint PDF Driver and save to a new PDF or image or other formats easily.

Solution 4. You can use "VeryPDF HookPrinter Print Logger" software to capture print jobs, convert them to PDF files, and upload PDF files to a web server automatically,

https://veryutils.com/hookprinter-print-logger

image

*** See Also:

VeryPDF Released docPrint Pro v8.0 today, docPrint Pro v8.0 is able to make a connection between docPrint and other Windows Printers,
http://www.verypdf.com/wordpress/201804/verypdf-release-notes-verypdf-released-docprint-pro-v8-0-today-docprint-pro-v8-0-is-able-to-make-a-connection-between-docprint-and-other-windows-printers-43787.html

How to intercept and capture a print job and convert it to PDF & Plain Text & Image files and then print?
http://www.verypdf.com/wordpress/201802/how-to-intercept-and-capture-a-print-job-and-convert-it-to-pdf-plain-text-image-files-and-then-print-43680.html

Saving a pending print job as PDF. Save Print Job in Queue as PDF. Save All Print Jobs As PDF. Convert Spool request to PDF and send as e-mail. Converting Print spool output in to a PDF. Convert Spool File to PDF. Convert Spool Files to PDF Excel and more. Capture Print Data and Save to PDF.
http://www.verypdf.com/wordpress/201608/saving-a-pending-print-job-as-pdf-save-print-job-in-queue-as-pdf-save-all-print-jobs-as-pdf-convert-spool-request-to-pdf-and-send-as-e-mail-converting-print-spool-output-in-to-a-pdf-convert-spool-42957.html

Need to capture a print job. How to capture a print job from Windows Print Spooler system?
http://www.verypdf.com/wordpress/201704/need-to-capture-a-print-job-how-to-capture-a-print-job-from-windows-print-spooler-system-43392.html

Print documents to virtual printer first, virtual printer will create PDF files and then forward printed documents to physical printer,
http://www.verypdf.com/wordpress/201708/print-documents-to-virtual-printer-first-virtual-printer-will-create-pdf-files-and-then-forward-printed-documents-to-physical-printer-43570.html

VeryPDF Released docPrint Pro v8.0 today, docPrint Pro v8.0 is able to make a connection between docPrint and other Windows Printers,
http://www.verypdf.com/wordpress/201804/verypdf-release-notes-verypdf-released-docprint-pro-v8-0-today-docprint-pro-v8-0-is-able-to-make-a-connection-between-docprint-and-other-windows-printers-43787.html

How to get VeryPDF Printer Capturer?
http://www.verypdf.com/wordpress/201701/how-to-get-verypdf-printer-capturer-43213.html

btw, above software are all save to PDF files, after you get the PDF files, you can use "VeryDOC PDF to XML Converter SDK" to convert from PDF files to XML files easily,

https://www.verydoc.com/pdf2xmlsdk.html

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 print

Problems to send the pdf to printer over asp.net source code, pdfprint.exe can not find the printer from ASP.NET source code

Hi,

I am using VeryPDF PDFPrint Command Line software to print my PDF files from ASP.NET source code,

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

I'm testing the pdfprint command line tool, my idea is to call it from asp.net code:

Dim startInfo As System.Diagnostics.ProcessStartInfo = New System.Diagnostics.ProcessStartInfo(strExe, strArguments)

And here:

* strExe: pdfprint.exe location
* strArguments: -printer PRINTERNAME FILETOPRINT

With another ms-dos commands working fine, for example:

copy PRINTER FILETOPRINT

But with pdfprint, the printer doesn't print, I have launched the debug option and this is the result:
------------------------
Read Command Line options...
Copyright (C) VeryPDF.com
"LOCATION\pdfprint.exe" "-debug" "-printer" PRINTER "FILETOPRINT"
You have 99 times to evaluate "VeryPDF PDFPrint Command Line" product, you may purchase a full version from http://www.verypdf.com/app/pdf-print-cmd/index.html to remove restrictions.
Version Build Date: Jun 21 2018
Try to load 'WINSPOOL.DRV' file...
Load 'WINSPOOL.DRV' file OK.
Current default printer is 'Microsoft Print to PDF'.
AddPrinterConnection to 'PRINTER' printer, return code = 0.
AddPrinterConnection return an error code (87).

Can't locate the PRINTER printer in this computer, please double check the printer name and to try again.

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

However, if launch the same command directly in ms-dos console, it works fine.

I would like to use this tool because I could set the tray to print with "papersource" option, and with copy command this is not possible.

Please, can you help me?

Thanks a lot in advance.
Customer
====================================================
Sorry for this matter, the error message is,

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

Can't locate the PRINTER printer in this computer, please double check the printer name and to try again.

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

When you can call pdfprint.exe from ASP.NET code, the ASP.NET and pdfprint.exe are run inside SYSTEM user account, the physical printer can't be accessed from SYSTEM user account, this is the reason why pdfprint.exe can not access to this physical printer.

You need to set your ASP.NET run inside an interactive user account instead of default SYSTEM user account, if so, pdfprint.exe will able to access to the physical printer properly.

You may look at following web page for more information about "Application Pool Identities",

-- Application Pool Identities

https://docs.microsoft.com/en-us/iis/manage/configuring-security/application-pool-identities

-- How do I configure the user account for an application pool in IIS?

You can change which user account is being used by right clicking "Application Pool" > "Advanced Settings" > Under "Identity", you can click the "…" and look for a different user account.

Whenever a new application pool is created in IIS, it will use an account defined by IIS (usually it’s called "ApplicationPoolIdentity") which is under the "Identity" section. Identities are similar to a "account" you would use to log into your window account example. This defines what users are allows to run that specific application.

User accounts could be restrictive and prevent the "ApplicationPoolIdentity" from running the Activate mobile application (either it’s under the default application pool or another application pool). You can change which user account is being used by right clicking "Application Pool" > Advanced Settings > Under "Identity", you can click the "…" and look for a different user account.

Application Pool Identity

image

You can either choose any of the service accounts on the server, or choose a specific user to run a specific application. When a user is chosen, click OK and restart the application pool.

-- How to find out which user account is running ASP.NET?

Use this code:

VB.NET

Response.Write("Windows Account which runs ASP.NET is: " & Environment.Username)

C#

Response.Write("Windows Account which runs ASP.NET is: " + Environment.Username);

If you debug your application in Visual Studio on localhost you'll get your user name. If you deploy ASP.NET web application on IIS 6.0 web server, you will probably get NETWORK SERVICE account, because that is default user running IIS.

VeryPDF

VN:F [1.9.20_1166]
Rating: 2.0/10 (1 vote cast)
VN:F [1.9.20_1166]
Rating: 0 (from 0 votes)