Exemple #1
0
        public static void Print(ReportNoLabel label, string printerName, int columns)
        {
            StringBuilder result  = new StringBuilder();
            int           xOffset = 0;
            int           yOffset = 23;

            result.Append("^XA");
            for (int i = 0; i < columns; i++)
            {
                label.AppendCommands(result, xOffset, yOffset);
                xOffset += 310;
            }
            result.Append("^XZ");
            RawPrinterHelper.SendStringToPrinter(printerName, result.ToString());
        }
        private void ButtonPrintPrintBarcode_Click(object sender, RoutedEventArgs e)
        {
            string collectionDate = string.Empty;

            if (this.m_ClientOrderClone.CollectionDate.HasValue == true)
            {
                collectionDate = this.m_ClientOrderClone.CollectionDate.Value.ToString("MM/dd/yyyy");
            }
            string zplCommandText = ContainerLabel.GetOneRow(this.m_ClientOrderClone.PLastName, this.m_ClientOrderClone.PFirstName, collectionDate);

            string printer = LocalSettings.Instance.BarcodeLabelPrinter;

            if (string.IsNullOrEmpty(printer) == false)
            {
                RawPrinterHelper.SendStringToPrinter(printer, zplCommandText);
            }
            else
            {
                MessageBox.Show("Please select a printer in settings.");
            }
        }
Exemple #3
0
        public void Print(string zplCommandText)
        {
            string printerName = "ZDesigner GX430t";

            RawPrinterHelper.SendStringToPrinter(printerName, "^XA" + zplCommandText + "^XZ");
        }