Type 1: Program after each output file
After each saved output file, BarcodeOCR starts a .bat script or an .exe application and passes information about that file. This lets you extend processing with your own applications or scripts, for example to further process each individual output file.
You set up the interface in the Advanced step of the configuration, with the option Start the following application after each saved output file.
General
- BarcodeOCR calls the interface after each saving of an output file, in the output folder as well as in the error folder. If an input document contains several pages, the application may therefore run several times per input document.
- The parameters are passed in a fixed form. You cannot change the order or the names of the parameters.
- You can start
.batscripts or.exeapplications. - BarcodeOCR waits until the script has finished. Then it prepares the next file for saving.
- There is no timeout while waiting for the process.
Security context of the service
The application runs in the security context of the BarcodeOCR service. So specify network access as a UNC path here as well. How to give the service access to network folders is described in Process network folders.
Parameters
| Parameter | Description | Sample values |
|---|---|---|
-result | Result of the processing | success / error |
-configurationName | Name of the configuration | "Test" |
-source | Full path to the input file | "C:\Config\dec24748\Test\Testfile.pdf" |
-destination | Full path to the output file | "C:\Config\dec24748\Test\Success\INV_12345.pdf" |
-pageFrom | Page number of the first page in the original batch | 1 |
-pageTo | Page number of the last page in the original batch | 1 |
-errorReason | Reason why the document was sorted into the error folder | None / NoBarcode / Duplicate / Error |
-detectedBarcode | Recognized barcode | INV_12345 |
Example of a parameter call
This form of passing the parameters cannot be changed.
-result=success -configurationName="Test" -source="C:\Config\dec24748\Test\Testfile.pdf" -destination="C:\Config\dec24748\Test\Success\INV_12345.pdf" -pageFrom=1 -pageTo=1 -errorReason=None -detectedBarcode=INV12345
The PowerShell interface Type 4 offers more information and further options.