public static void Run()
        {
            //ExStart:EncodeQRCode

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

            // Instantiate BarCodeBuilder object
            Aspose.BarCode.BarCodeBuilder builder = new Aspose.BarCode.BarCodeBuilder();

            // Set the Code text for the barcode
            builder.CodeText = "ABCDEFGHIJKLMNOPQRSTUVWXYZ";

            // Set the symbology type to QR
            builder.EncodeType = Aspose.BarCode.Generation.EncodeTypes.QR;

            // Set the error level
            builder.QRErrorLevel = Aspose.BarCode.QRErrorLevel.LevelQ;

            // Set the QR barcode version number
            builder.QRVersion = Aspose.BarCode.QRVersion.Version10;

            //Save the image
            builder.Save("qr_version10_errorQ.png");

            //ExEnd:EncodeQRCode
        }
Пример #2
0
        public static void Run()
        {
            // ExStart:ChecksumSupplementData

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

            //Generation
            //Instantiate BarCodeBuilder object
            Aspose.BarCode.BarCodeBuilder builder = new Aspose.BarCode.BarCodeBuilder();

            //Set the Code text for the barcode
            builder.CodeText = "1234567890";

            //Set the symbology type to Code128
            builder.EncodeType = Aspose.BarCode.Generation.EncodeTypes.Codabar;

            //Set the EnableChecksum property to yes
            builder.EnableChecksum = Aspose.BarCode.EnableChecksum.Yes;

            //Set the CodabarChecksumMode
            builder.CodabarChecksumMode = Aspose.BarCode.CodabarChecksumMode.Mod10;

            //Save the image on the system
            builder.Save("Codabar_Mod10.png");

            //Recognition
            //Initialize reader object
            using (Aspose.BarCode.BarCodeRecognition.BarCodeReader reader = new Aspose.BarCode.BarCodeRecognition.BarCodeReader("Codabar_Mod10.png", Aspose.BarCode.BarCodeRecognition.DecodeType.Codabar))
            {
                //Set ChecksumValidation property of the reader to On
                reader.ChecksumValidation = Aspose.BarCode.BarCodeRecognition.ChecksumValidation.On;
                while (reader.Read())
                {
                    //Get code text
                    Console.WriteLine("{0}:{1}", reader.GetCodeType(), reader.GetCodeText());

                    //Get checksum value
                    Console.WriteLine("Checksum:" + reader.GetCheckSum());
                }
            }


            // ExEnd:ChecksumSupplementData
        }
        public static void Run()
        {
            //ExStart:CreateEnCodeDatamatrixBarCode

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

            // Create an instance of BarCodeBuilder class
            // Set codetext value and EncodeType
            Aspose.BarCode.BarCodeBuilder buidler = new Aspose.BarCode.BarCodeBuilder("abcdef123456", Aspose.BarCode.Generation.EncodeTypes.DataMatrix);

            // Set the DataMatrix encoding mode to Text encodation scheme
            buidler.DataMatrixEncodeMode = Aspose.BarCode.DataMatrixEncodeMode.Text;

            // Save the barcode image
            buidler.Save("dataMatrixText.png");

            //ExEnd:CreateEnCodeDatamatrixBarCode
        }
        public static void Run()
        {
            // ExStart:ChecksumSupplementData

            //Instantiate BarCodeBuilder object
            Aspose.BarCode.BarCodeBuilder builder = new Aspose.BarCode.BarCodeBuilder();

            //Set the Code text for the barcode
            builder.CodeText = "(01)98898765432106(3202)012345(15)991231";

            //Set the symbology type to Code128
            builder.EncodeType = Aspose.BarCode.Generation.EncodeTypes.DatabarExpandedStacked;

            //Set the cloumn property to define segments per row
            builder.Columns = 6;

            //Save the image
            builder.Save("6segmets.png");

            // ExEnd:ChecksumSupplementData
        }
Пример #5
0
        public static void Run()
        {
            // ExStart:ChecksumSupplementData

            // Create an instance of BarCodeBuilder class
            // Set barcode text
            // Set encoding type

            //using (Aspose.BarCode.BarCodeBuilder barCodeBuilder = new Aspose.BarCode.BarCodeBuilder("12345678", Aspose.BarCode.Generation.EncodeTypes.Postnet))
            using (Aspose.BarCode.BarCodeBuilder barCodeBuilder = new Aspose.BarCode.BarCodeBuilder("12345678", Aspose.BarCode.Generation.EncodeTypes.AustraliaPost))
            {
                // Set barcode Dimension and height
                barCodeBuilder.xDimension = 1f;
                barCodeBuilder.BarHeight  = 40;

                // Save the barcode image
                barCodeBuilder.Save("postnet.png");
            }

            // ExEnd:ChecksumSupplementData
        }