Exemplo n.º 1
0
        public static void Run()
        {
            // ExStart:ChecksumSupplementData

            // The path to the documents directory.
            string dataDir = RunExamples.GetDataDir_ManageBarCodes();

            // Create an instance of BarCodeReader class
            // Set file path
            // Set the recognition type
            using (Aspose.BarCode.BarCodeRecognition.BarCodeReader reader = new Aspose.BarCode.BarCodeRecognition.BarCodeReader("1bc.png", Aspose.BarCode.BarCodeRecognition.DecodeType.Code128))
            {
                // Perform read operation
                if (reader.Read())
                {
                    // Create an array of Code128DataPortion class
                    // Call the GetCode128DataPortions method
                    Aspose.BarCode.BarCodeRecognition.Code128DataPortion[] code128DataPortions = reader.GetCode128DataPortions();

                    // Execute Loop for each Code128DataPortion instance
                    foreach (Aspose.BarCode.BarCodeRecognition.Code128DataPortion code128DataPortion in code128DataPortions)
                    {
                        // Display the subtype and data
                        System.Console.WriteLine("Code128SubType {0}", code128DataPortion.Code128SubType);
                        System.Console.WriteLine("Data {0}", code128DataPortion.Data);
                    }
                }
            }

            // ExEnd:ChecksumSupplementData
        }