It is necessary to print a cash order. I took the panel, assigned it to bg-image and asked her the size of A4 paper. In the place where the values are needed, Labels were made.
print using code
private void toolStripSplitButton1_ButtonClick(object sender, EventArgs e) { printDocument1.Print(); } private void printDocument1_PrintPage(object sender, System.Drawing.Printing.PrintPageEventArgs e) { printDocument1.DefaultPageSettings.Margins = new System.Drawing.Printing.Margins(0, 0, 0, 0); var bitmap = new Bitmap(panel1.Width, panel1.Height); panel1.DrawToBitmap(bitmap, new Rectangle(panel1.Location, bitmap.Size)); e.Graphics.DrawImage(bitmap,new Point(0,0)); } Indentations do not disappear, what to do? help solve the problem. Or is there a better alternative to printing a template document?
