Skip to main content

Type 1: Program after each output file

All editions

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 .bat scripts or .exe applications.
  • 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​

ParameterDescriptionSample values
-resultResult of the processingsuccess / error
-configurationNameName of the configuration"Test"
-sourceFull path to the input file"C:\Config\dec24748\Test\Testfile.pdf"
-destinationFull path to the output file"C:\Config\dec24748\Test\Success\INV_12345.pdf"
-pageFromPage number of the first page in the original batch1
-pageToPage number of the last page in the original batch1
-errorReasonReason why the document was sorted into the error folderNone / NoBarcode / Duplicate / Error
-detectedBarcodeRecognized barcodeINV_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.