Call codesoft to print codes, batch continuous printing, variable printing, and codesoft codes.
Call the codeSoft template to implement batch continuous printing.
Code:
Create tag 1. lab.
Add two variables var0 and var1.
Using LabelManager2;
String strFile = System. windows. forms. application. startupPath. toString () + "\ 1.lab"; lbl = new LabelManager2.ApplicationClass (); lbl. documents. open (strFile, false); // call the configured lbl tag doc = lbl. activeDocument; // obtain all printer names Strings vars = lbl. printerSystem (). printers (enumKindOfPrinters. lppxAllPrinters); // obtain the required printer name. The printer can directly give the name value // string printName = vars. item (2); PrintDocument prtdoc = new PrintDocument (); String strdefaprinprinter = prtdoc. printerSettings. printerName; // obtain the default printer name for (int j = 0; j <vars. count; j ++) {string [] arryString = vars. item (j ). split (','); if (arryString [0] = strdefaprinprinter) {doc. printer. switchTo (strdefaprinprinter, arryString [1], true); break ;}} DataTable dt = codeInfo_DAL.GetData (this. cbb. selectedValue. toString (); if (dt! = Null & dt. rows. count> 0) {foreach (DataRow dr in dt. rows) {// tag variable doc in the codesoft template. variables. formVariables. item ("var0 "). value = dr ["CodeID"]. toString (); doc. variables. formVariables. item ("var1 "). value = dr ["Name"]. toString (); // doc. printDocument (3); doc. printLabel (1, 1, 1, 1, 1, "") ;}// tags are printed consecutively in batches. FormFeed () is output to the printer only after parameter variables are output. Doc. FormFeed (); lbl. Quit ();}
Related:
Codesoft template. The bar code is displayed in the center. settings:
Codesoft template, text spacing setting below 128 yards.
How to import EXCEL Data to CODESOFT barcode printer software
You can configure the data source with TOOLS such as ODBC and OLEDB under the TOOLS menu, double-click the variable you want to configure, and select data source in the attribute window, you can configure Variable Data. If you have any questions, QQ: 274845698. I am specialized in this printing company.
Vb + codesoft Development Program, printing * label files in lab format, printer not zebra company ZM600 printer how to increase the printing speed?
Generally, a zebra printer transmits the printed content to the printer before printing. For example, if you print 30 tags of sequence variables, the printed image is usually generated at one time and transmitted to the printer. Instead of printing one image and then generating the second image, tag serialization has little impact on the printing speed. It may be that your programming design adds the time for generating printed images. Do not understand VB, for reference only!