I'm trying to print labels of my products right from my application.
But I can not reduce the size of the paper in the print, so I'm missing 1 label for every 1 print I make, follows the photo:
MyPreviewDialog
showsthatthepaperreallyisbiggerthanitshould:Followthepicture:
Icannotfixitforprinting,doesanyonepleasehaveasolution?Followmycodesofar:
privatevoidbtnPreview_Click(objectsender,EventArgse){DVprintPreviewDialog1.Document=DVprintDocument1;DVprintPreviewDialog1.ShowDialog();}privatevoidDVprintDocument1_PrintPage(objectsender,System.Drawing.Printing.PrintPageEventArgse){Bitmapbmp=Properties.Resources.logo;ImagenewImage=bmp;e.Graphics.DrawImage(newImage,10,3,newImage.Width,newImage.Height);e.Graphics.DrawString("TESTE", new Font("Arial", 12, FontStyle.Bold), Brushes.Black, new Point(130, 13));
}