private void printDoc_PrintPage(Object sender, PrintPageEventArgs e) { BarcodeStringConverter.EAN8 newString = new BarcodeStringConverter.EAN8(); string sTest = "0002321"; string textToPrint = newString.EAN8(ref sTest); Font printFont = new Font("Code EAN13",40); e.Graphics.DrawString(textToPrint, printFont, Brushes.Black, 0, 0); }
private void printDoc_PrintPage(Object sender, PrintPageEventArgs e) { BarcodeStringConverter.EAN8 newString = new BarcodeStringConverter.EAN8(); Font printfont1 = new Font("Arial", 9); Font printFont2 = new Font("Code EAN13", 40); float iHeightA = 12; float iHeightB = 20; float iX = 65; for (int iBarcode = 0; iBarcode < aBarcodes.Count; iBarcode++) { e.Graphics.DrawString(aBarcodeNames[iBarcode].ToString().Trim(), printfont1, Brushes.Black, iX, iHeightA); string sBarcode = aBarcodes[iBarcode].ToString().Trim(); string sPrintCode = newString.EAN8(ref sBarcode); e.Graphics.DrawString(sPrintCode, printFont2, Brushes.Black, iX, iHeightB); if (iX == 65) { iX = 225; } else { iX = 65; iHeightA += 130; iHeightB += 130; } } }
private void printDoc_PrintPage(Object sender, PrintPageEventArgs e) { BarcodeStringConverter.EAN8 newString = new BarcodeStringConverter.EAN8(); string textToPrint1 = sRecievedBatchBarcodeName; string textToPrint2 = sRecievedBatchBarcode; Font printfont1 = new Font("Arial", 5); Font printFont2 = new Font("Code EAN13", 40); e.Graphics.DrawString(textToPrint1, printfont1, Brushes.Black, 8, 0); e.Graphics.DrawString(newString.EAN8(ref textToPrint2), printFont2, Brushes.Black, 65, 20); }