There's a big God who solves a similar problem. Please, save me.
-------Split-------
Recently in a courier label printing system, using. NET (C #) to call the Zebra printer "Zdesigner gk888t (EPL)" To print, the program is to achieve continuous printing, but the actual printer is to play one, stop, back a little paper, then the next one, and then stop, ... And so on
This interval cannot be tolerated because it is a large number of labels, and it is useless to try out settings for various printer properties and options.
Baidu saw someone said to be the driver of the seagull, after the test is no longer the middle pause, but the business party is not very accept this program (machine more, change the workload of the drive is also pretty big), no way can only find the problem of code, test found even the simplification of the printing logic to the simplest also will pause, the following is the most streamlined Please help me see what's wrong:
Programme one:
usingSystem.Drawing.Printing;usingSystem.IO;usingSystem.Windows.Forms;namespaceprintserver{Internal Static classprogram{/// <summary>///The main entry point for the application. /// </summary>[STAThread]Private Static voidMain (string[] args) { for(inti =0; I <2; i++) {Test ();}}Private Static voidTest () {varPrintDocument =NewPrintDocument ();p Rintdocument.printpage+=NewPrintpageeventhandler (printdocument_printpage);p rintDocument.PrinterSettings.PrinterName="Zdesigner gk888t (EPL)";p rintdocument.print ();}Private Static voidPrintdocument_printpage (Objectsender, PrintPageEventArgs e) {E.graphics.drawline (Pens.black, -, -, $, $);}}}
Scenario Two:
usingSystem.Drawing.Printing;usingSystem.IO;usingSystem.Windows.Forms;namespaceprintserver{Internal Static classprogram{/// <summary>///The main entry point for the application. /// </summary>[STAThread]Private Static voidMain (string[] args) {Test ();}Private Static voidTest () {varPrintDocument =NewPrintDocument ();p Rintdocument.printpage+=NewPrintpageeventhandler (printdocument_printpage);p rintDocument.PrinterSettings.PrinterName="Zdesigner gk888t (EPL)";p rintdocument.print ();}Private Static int_printedcount =0;Private Static voidPrintdocument_printpage (Objectsender, PrintPageEventArgs e) {E.graphics.drawline (Pens.black, -, -, $, $); _printedcount++; E.hasmorepages= _printedcount <2;}}}
Using both of these scenarios for print testing, there is a noticeable pause between the two pages and paper back.
Ask for help about. NET (C #) calls to the Zebra printer (Zdesigner gk888t (EPL)) to roll back when you change pages