By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,830 Members | 1,758 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,830 IT Pros & Developers. It's quick & easy.

print "N-up?"

P: n/a
I am trying to print some 2x6 labels on a SATO CL408e thermal label printer. The 2x6 labels are arranged in "landscape" mode with 2 labels per "sheet." When I attempt to print "x" copies of a 1 page label document, I get "x" formfeeds and "x" wasted labels.

Is there any way to manipulate the .NET printing engine to do a over-under 2-up landscape printing? I'm thinking no, but maybe there's a way. The printer has the ability to sense the end of a label, but apparently it can't sense that there are 2 labels side-by-side on the feed.

I am thinking that the only solution is to treat the two labels as 1 4x6 landscape label and just always print an even number of labels.

I am including the code that I am using to generate and print the labels:
/// <summary>/// /// </summary>/// <param name="Quantity"></param>public void PrintBoxLabel(short Quantity){ short labelQty = Quantity; printDoc = new PrintDocument(); printDoc.PrintPage += new PrintPageEventHandler(this.printDoc_PrintBoxLabel) ; printDoc.EndPrint += new PrintEventHandler(this.printDoc_EndBoxPrint); printDoc.PrinterSettings.PrinterName = (string)App.Config["boxCartonPalletPrinter"]; printDoc.DocumentName = this.stockCode; printDoc.PrinterSettings.Copies = labelQty; printDoc.DefaultPageSettings.Landscape = true; foreach (PaperSize psz in printDoc.PrinterSettings.PaperSizes) { if (psz.PaperName == (string)App.Config["boxCartonPalletPaperSize"]) { printDoc.DefaultPageSettings.PaperSize = psz; break; } } printDoc.DefaultPageSettings.Margins.Left = 0; printDoc.DefaultPageSettings.Margins.Right = 0; printDoc.DefaultPageSettings.Margins.Top = 0; printDoc.DefaultPageSettings.Margins.Bottom = 0; printDoc.OriginAtMargins = true; printDoc.Print();}private void printDoc_PrintBoxLabel(object sender, PrintPageEventArgs e){ Graphics grfx = e.Graphics; SizeF sizef; Font cooFont = new Font("Lucida Console", 10); Font uomFont = new Font("Lucida Console", 14); Font stkFont = new Font("Lucida Console", 16); string spanishText = ""; string frenchText = ""; string baseLabelText = (string)stk["CountryOfOrigin"]; string boxCode = (string)stk["BoxLabelCode"]; int unitOfMeasure = (int)stk["UnitOfMeasure"]; float barWidth = (float)(26.7 * .00254); float barHeight = (float)1.5; float barRatio = (float)2.81; switch (baseLabelText) { case "Made in USA": spanishText = "Hecho en E.U.A."; frenchText = "Fabriqu\x00E9 en Etats Unis"; break; case "Made in Turkey": spanishText = "Hecho en Turqu\x00EDa"; frenchText = "Fabriqu\x00E9 en Turqie"; break; case "Made in India": spanishText = "Hecho en la India"; frenchText = "Fabriqu\x00E9 en Inde"; break; case "Made in Italy": spanishText = "Hecho en Italia"; frenchText = "Fabriqu\x00E9 en Italie"; break; case "Made in Mexico": spanishText = "Hecho en M\x00E9xico"; frenchText = "Fabriqu\x00E9 au Mexico"; break; case "Made in Philippines": spanishText = "Hecho en Filipinas"; frenchText = "Fabriqu\x00E9 en Philipines"; break; } // Draw the stock code in the upper left sizef = grfx.MeasureString(this.stockCode, stkFont); grfx.DrawString(this.stockCode, stkFont, Brushes.Black, (float)37.5, 25); // Draw the Unit of Measure in the upper right grfx.DrawString(unitOfMeasure.ToString(), uomFont, Brushes.Black, 415, 25); // Draw the "Each","Chaque", "Cada Uno" in the upper right grfx.DrawString("Each", cooFont, Brushes.Black, 470, (float)12.5); grfx.DrawString("Chaque", cooFont, Brushes.Black, 470, 32); grfx.DrawString("Cada Uno", cooFont, Brushes.Black, 470, 50); // Draw the horizontal line across the label grfx.DrawLine(new Pen(Brushes.Black, 1), 0, (float)62.5, 600, (float)62.5); //Draw the barcode on the label RectangleF rect = Barcode.DrawInterleved2Of5(boxCode, "", true, BarcodeLabelAlignment.BelowCenter, barWidth, 0, barHeight, barRatio, (float).5, false, new RectangleF(25, 82, 350, 110), new Font("Lucida Console", 14), Color.Black, grfx); // Draw the country of origin strings on the right side of the label sizef = grfx.MeasureString(baseLabelText, cooFont); grfx.DrawString(baseLabelText, cooFont, Brushes.Black, 375 + ((225 - sizef.Width) / 2), (float)87.5); sizef = grfx.MeasureString(spanishText, cooFont); grfx.DrawString(spanishText, cooFont, Brushes.Black, 375 + ((225 - sizef.Width) / 2), (float)120); sizef = grfx.MeasureString(frenchText, cooFont); grfx.DrawString(frenchText, cooFont, Brushes.Black, 375 + ((225 - sizef.Width) / 2), (float)150); e.HasMorePages = false;}Thanks in advance,Matthew BelkBizSpeed Inc.
Nov 16 '05 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.