Aspose.BarCode.Examples.CSharp.ManageBarCodes.RecognizeBarcodeWithChineseCharacters.Run C# (CSharp) Method

Run() public static method

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

                // Load barcode image and Read barcode
                var reader = new BarCodeReader(dataDir + "Chinese.png", DecodeType.Pdf417);
                while (reader.Read())
                {
                    var t = reader.GetCodeBytes();
                    var encodingValue = Encoding.GetEncoding(1254).GetString(t);
                }
                reader.Close();
                // ExEnd:RecognizeBarcodeWithChineseCharacters
            }
            catch (Exception ex)
            {
                Console.WriteLine(ex.Message + "\nThis example will only work if you apply a valid Aspose License. You can purchase full license or get 30 day temporary license from http://www.aspose.com/purchase/default.aspx.");
            }
            
        }
    }
RecognizeBarcodeWithChineseCharacters