public static void Run()
        {
            //ExStart:FNC1SecondPositionInExtendedMode
            // The path to the documents directory.
            string dataDir = RunExamples.GetDataDir_CreateAndManage2DBarCodes();

            // Create codetext
            QrExtCodetextBuilder lTextBuilder = new QrExtCodetextBuilder();

            lTextBuilder.AddFNC1SecondPosition("12");
            lTextBuilder.AddPlainCodetext("TRUE3456");

            // Generate codetext
            string lCodetext = lTextBuilder.GetExtendedCodetext();

            // Instantiate barcode object and Set its CodeText, encoding mode, error correction level,  display text and Symbology
            BarCodeBuilder builder = new BarCodeBuilder(lCodetext, EncodeTypes.QR);

            builder.QREncodeMode  = QREncodeMode.ExtendedCodetext;
            builder.QRErrorLevel  = QRErrorLevel.LevelL;
            builder.Display2DText = "My Text";

            // Get barcode image Bitmap and Save QR code
            Bitmap lBmp = builder.GenerateBarCodeImage();

            lBmp.Save(dataDir + "FNC1SecondPositionInExtendedMode_out.bmp", ImageFormat.Bmp);
            //ExEnd:FNC1SecondPositionInExtendedMode
        }
        public static void Run()
        {
            //ExStart:FNC1SecondPositionInExtendedMode
            // The path to the documents directory.
            string dataDir = RunExamples.GetDataDir_CreateAndManage2DBarCodes();

            // Create codetext
            QrExtCodetextBuilder lTextBuilder = new QrExtCodetextBuilder();

            lTextBuilder.AddFNC1SecondPosition("12");
            lTextBuilder.AddPlainCodetext("TRUE3456");

            // Generate codetext
            string lCodetext = lTextBuilder.GetExtendedCodetext();

            // Instantiate barcode object and Set its CodeText, encoding mode, error correction level,  display text and Symbology
            BarcodeGenerator generator = new BarcodeGenerator(EncodeTypes.QR, lCodetext);

            generator.Parameters.Barcode.QR.QrEncodeMode = QREncodeMode.ExtendedCodetext;
            generator.Parameters.Barcode.QR.QrErrorLevel = QRErrorLevel.LevelL;
            generator.Parameters.Barcode.CodeTextParameters.TwoDDisplayText = "My Text";

            // Get barcode image Bitmap and Save QR code
            Bitmap lBmp = generator.GenerateBarCodeImage();

            lBmp.Save(dataDir + "FNC1SecondPositionInExtendedMode_out.bmp", ImageFormat.Bmp);
            //ExEnd:FNC1SecondPositionInExtendedMode
            Console.WriteLine(Environment.NewLine + "Barcode saved at " + dataDir + "FNC1SecondPositionInExtendedMode_out.bmp");
        }
Exemplo n.º 3
0
        public static void Run()
        {
            // The path to the documents directory.
            string dataDir = RunExamples.GetDataDir_CreateAndManage2DBarCodes();

            // Create codetext
            QrExtCodetextBuilder lTextBuilder = new QrExtCodetextBuilder();

            lTextBuilder.AddFNC1SecondPosition("12");
            lTextBuilder.AddPlainCodetext("TRUE3456");

            // Generate codetext
            string lCodetext = lTextBuilder.GetExtendedCodetext();

            // Instantiate barcode object
            BarCodeBuilder builder = new BarCodeBuilder();

            // Set its Symbology
            builder.SymbologyType = Symbology.QR;

            // Set encoding mode
            builder.QREncodeMode = QREncodeMode.ExtendedCodetext;

            // Set error correction level
            builder.QRErrorLevel = QRErrorLevel.LevelL;

            // Set code text
            builder.CodeText = lCodetext;

            // Set display text
            builder.Display2DText = "My Text";

            // Get barcode image Bitmap
            Bitmap lBmp = builder.GenerateBarCodeImage();

            // Save QR code
            lBmp.Save(dataDir + "FNC1SecondPositionInExtendedMode.bmp", ImageFormat.Bmp);
        }
        public static void Run()
        {
            // The path to the documents directory.
            string dataDir = RunExamples.GetDataDir_CreateAndManage2DBarCodes();

            // Create codetext
            QrExtCodetextBuilder lTextBuilder = new QrExtCodetextBuilder();
            lTextBuilder.AddFNC1SecondPosition("12");
            lTextBuilder.AddPlainCodetext("TRUE3456");

            // Generate codetext
            string lCodetext = lTextBuilder.GetExtendedCodetext();

            // Instantiate barcode object and Set its CodeText, encoding mode, error correction level,  display text and Symbology
            BarCodeBuilder builder = new BarCodeBuilder(lCodetext, EncodeTypes.QR);
            builder.QREncodeMode = QREncodeMode.ExtendedCodetext;
            builder.QRErrorLevel = QRErrorLevel.LevelL;
            builder.Display2DText = "My Text";

            // Get barcode image Bitmap and Save QR code
            Bitmap lBmp = builder.GenerateBarCodeImage();
            lBmp.Save(dataDir + "FNC1SecondPositionInExtendedMode_out.bmp", ImageFormat.Bmp);
        }