Click here to Skip to main content
15,889,211 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
private void printpage(object sender, PrintPageEventArgs e)
 { 
e.Graphics.PageUnit = gu; 
e.PageSettings.PaperSize = new System.Drawing.Printing.PaperSize(); e.PageSettings.PaperSize.Width = 75; 
e.PageSettings.PaperSize.Height = 15; 
System.Drawing.Image img = System.Drawing.Image.FromFile("C:/'" + barcode_txt + "'.jpg");

 #region first sticker(1up) 
e.Graphics.DrawString("XYZ", Boldfont, Brushes.Black, 15, 5);//120,50 e.Graphics.DrawImage(img, 10, 8);//105,60 
e.Graphics.DrawString(barcode_txt, newfont, Brushes.Black, 16, 12);//160,70
 e.Graphics.DrawString(item_desc, newfont, Brushes.Black, 7, 14);//75,80 
e.Graphics.DrawString(SINM.ToString(), newfont, Brushes.Black, 35, 14);//200,80

 #endregion 

#region second sticker(2up)
 e.Graphics.DrawString("XYZ", Boldfont, Brushes.Black, 45, 5);//235,50 e.Graphics.DrawImage(img, 42, 8);//220,60 
e.Graphics.DrawString(barcode_txt, newfont, Brushes.Black, 49, 12);//260,70 e.Graphics.DrawString(item_desc, newfont, Brushes.Black, 40, 14);//240,80 e.Graphics.DrawString(SINM.ToString(), newfont, Brushes.Black, 65, 14);//365,80 
#endregion 
} 

if (MaxLine > 75)
               e.HasMorePages = true;
           else
               e.HasMorePages = false;


the stickers are being omitted blank.. I.E when i print the text is being printed on 8 sticker instead of 1 sticker and if i print again the print is on 16 sticker instead of 2 sticker...
i am using running roll of stickers with 2 ups...
any other suggestions or advice pls?
Posted
Updated 30-Oct-13 5:03am
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900