public static void ExportBarcodeToXML(string dataDir)
        {
            // ExStart:ExportBarcodeToXML
            // Instantiate barcode object and set CodeText & Barcode Symbology
            BarcodeGenerator generator = new BarcodeGenerator(EncodeTypes.Pdf417, "this is some test code text. \n Second line \n third line.");

            // Set width and height
            generator.Parameters.Barcode.XDimension.Millimeters = 0.6f;
            generator.Parameters.Barcode.BarHeight.Millimeters  = 1.2f;

            string xmlFile = dataDir + "barcode.xml";

            generator.ExportToXml(xmlFile);
            // ExEnd:ExportBarcodeToXML
            Console.WriteLine(Environment.NewLine + "Barcode exported to XML and saved at " + dataDir);
        }