Aspose.BarCode.Examples.CSharp.ManageAndOptimizeBarCodeRecognition.SetBarcodeOrientation.Run C# (CSharp) Method

Run() public static method

public static Run ( ) : void
return void
        public static void Run()
        {
            try
            {
                // The path to the documents directory.
                string dataDir = RunExamples.GetDataDir_ManageAndOptimizeBarcodeRecognition();

                // Create an instance of BarCodeReader and set image and symbology type to recognize
                BarCodeReader barCodeReader = new BarCodeReader(dataDir + "BarcodeOrientation.png", DecodeType.Code39Standard);

                // Set the orientation and  Try to recognize all possible barcodes in the image and Display the codetext
                barCodeReader.OrientationHints = RecognitionHints.Orientation.Rotate90;
                while (barCodeReader.Read())
                {
                    Console.WriteLine("Codetext: " + barCodeReader.GetCodeText());
                }

                // Close the reader
                barCodeReader.Close();
            }
            catch (Exception ex)
            {
                Console.WriteLine(ex.Message + "\nThis example will only work if you apply a valid Aspose BarCode License. You can purchase full license or get 30 day temporary license from http://wwww.aspose.com/purchase/default.aspx.");
            }
        }
    }
SetBarcodeOrientation