Answered by:
Print Image using Custom Printer

Question
-
User-2071802366 posted
Hi all,
i am trying to print from Web Applicaton to Label Printer. where i need to fetch the image from the folder and then print to Label Printer.
i had tried some code below, in which when i press to print a empty paper comes out of the label printer. so please help me as do i miss something ?
protected void Print_Click(object sender, EventArgs e) { try { PaperSize pS = new PaperSize("Custom Size", 23, 23); label.DefaultPageSettings.PaperSize = pS; label.PrinterSettings.PrinterName = "Brother QL-700"; label.PrinterSettings.DefaultPageSettings.PaperSize = pS; label.PrintPage += new PrintPageEventHandler(label_PrintPage); label.Print(); } catch (Exception ex) { Response.Write(ex); } } ******************************************************************************************************8 private void label_PrintPage(object sender, PrintPageEventArgs e) { SolidBrush brush = new SolidBrush(Color.Black); Font header = new Font(FontFamily.GenericSansSerif, 12.0F, FontStyle.Bold); System.Drawing.Image i = System.Drawing.Image.FromFile("E://qrcode.png"); e.Graphics.DrawImage(i, 100, 100, 22, 22); }
Tuesday, October 8, 2013 3:44 AM
Answers
-
User-2071802366 posted
Fixed the issues by changing the position over the image on print.
- Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
Tuesday, October 8, 2013 10:58 PM -
User488649576 posted
Hi,
Please refer to the following link, it will descrip the Label Printer:
http://www.jayway.com/2013/03/11/label-printing-in-your-net-application-with-a-dymo-labelwriter-450/
There is a Printing Demo:
http://msdn.microsoft.com/en-us/library/system.drawing.printing.printdocument.printpage.aspx
Thanks!!
- Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
Tuesday, October 8, 2013 11:23 PM
All replies
-
User-2071802366 posted
Fixed the issues by changing the position over the image on print.
- Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
Tuesday, October 8, 2013 10:58 PM -
User488649576 posted
Hi,
Please refer to the following link, it will descrip the Label Printer:
http://www.jayway.com/2013/03/11/label-printing-in-your-net-application-with-a-dymo-labelwriter-450/
There is a Printing Demo:
http://msdn.microsoft.com/en-us/library/system.drawing.printing.printdocument.printpage.aspx
Thanks!!
- Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
Tuesday, October 8, 2013 11:23 PM