Barcode Reader CLI
Integration
C#
C#
brcli-example.config
using System; using System.IO; using System.Runtime.CompilerServices; string[] args = { "-type=code128", "https://wabr.inliteresearch.com/SampleImages/1d.pdf", "@\"./brcli-example.config\"" // Additional options and sources in configuration file }; string output; string error; using (Process proc = new Process()) { proc.StartInfo = new ProcessStartInfo { FileName = "./BarcodeReaderCLI", Arguments = string.Join(" ", args), UseShellExecute = false, RedirectStandardOutput = true, RedirectStandardError = true, }; proc.Start(); error = proc.StandardError.ReadToEnd(); output = proc.StandardOutput.ReadToEnd(); proc.WaitForExit(); }; if (output != "") Console.WriteLine("STDOUT:\n" + output); if (error != "") Console.WriteLine("STDERR:\n" + error);