EDN Admin
Well-known member
<span style="color:#474747; font-family:arial,verdana,tahoma,sans-serif; font-size:14px; line-height:21px; background-color:#eef4f9 Hi, Im doing a credential software for a school that takes pictures, gets names... you know things like that.<br style="color:#474747; font-family:arial,verdana,tahoma,sans-serif; font-size:14px; line-height:21px; background-color:#eef4f9
<br style="color:#474747; font-family:arial,verdana,tahoma,sans-serif; font-size:14px; line-height:21px; background-color:#eef4f9
<span style="color:#474747; font-family:arial,verdana,tahoma,sans-serif; font-size:14px; line-height:21px; background-color:#eef4f9 My trouble is printing. I need to print two images (2025px * 1275px) And I need to do it in to a small paper size<br style="color:#474747; font-family:arial,verdana,tahoma,sans-serif; font-size:14px; line-height:21px; background-color:#eef4f9
<span style="color:#474747; font-family:arial,verdana,tahoma,sans-serif; font-size:14px; line-height:21px; background-color:#eef4f9 2.126in * 3.386in or 54mm * 86mm (same size).<br style="color:#474747; font-family:arial,verdana,tahoma,sans-serif; font-size:14px; line-height:21px; background-color:#eef4f9
<br style="color:#474747; font-family:arial,verdana,tahoma,sans-serif; font-size:14px; line-height:21px; background-color:#eef4f9
<span style="color:#474747; font-family:arial,verdana,tahoma,sans-serif; font-size:14px; line-height:21px; background-color:#eef4f9 this is my code... but it doesnt print more than one page.<br style="color:#474747; font-family:arial,verdana,tahoma,sans-serif; font-size:14px; line-height:21px; background-color:#eef4f9
<span style="color:#474747; font-family:arial,verdana,tahoma,sans-serif; font-size:14px; line-height:21px; background-color:#eef4f9 I only have one button that calls imprimirFrontal() and the images with that resolution. <br style="color:#474747; font-family:arial,verdana,tahoma,sans-serif; font-size:14px; line-height:21px; background-color:#eef4f9
<br style="color:#474747; font-family:arial,verdana,tahoma,sans-serif; font-size:14px; line-height:21px; background-color:#eef4f9
<span style="color:#474747; font-family:arial,verdana,tahoma,sans-serif; font-size:14px; line-height:21px; background-color:#eef4f9 Do you have any ideas?? or can you help me to fix my code?<br style="color:#474747; font-family:arial,verdana,tahoma,sans-serif; font-size:14px; line-height:21px; background-color:#eef4f9
<br style="color:#474747; font-family:arial,verdana,tahoma,sans-serif; font-size:14px; line-height:21px; background-color:#eef4f9
<span style="color:#474747; font-family:arial,verdana,tahoma,sans-serif; font-size:14px; line-height:21px; background-color:#eef4f9 I want to print to a CardSize.<br style="color:#474747; font-family:arial,verdana,tahoma,sans-serif; font-size:14px; line-height:21px; background-color:#eef4f9
<br style="color:#474747; font-family:arial,verdana,tahoma,sans-serif; font-size:14px; line-height:21px; background-color:#eef4f9
<span style="color:#474747; font-family:arial,verdana,tahoma,sans-serif; font-size:14px; line-height:21px; background-color:#eef4f9 this code is for demo... only print is not working
<pre class="prettyprint private void imprimirFrontal()
{
imagenFrontal = new Bitmap("ImagenFrontal_HD.png");
ImagenTrasera = new Bitmap("ImagenTrasera_HD.png");
//2.126in x 3.386in
//54mm x 86mm
PaperSize CardSize = new PaperSize("Card", 213, 339);
//CardSize.RawKind = (int)PaperKind.Custom;
PrintDocument pd = new PrintDocument();
pd.PrinterSettings.DefaultPageSettings.PaperSize = CardSize;
pd.DefaultPageSettings.Landscape = true;
pd.PrintPage += new PrintPageEventHandler(imprimirDocumentoTrasero);
pd.PrintPage += new PrintPageEventHandler(imprimirDocumentoFrontal);
PrintPreviewDialog previewDialog = new PrintPreviewDialog();
previewDialog.Document = pd;
previewDialog.ShowDialog();
//pd.Print();
}
private void imprimirDocumentoFrontal(System.Object sender,
System.Drawing.Printing.PrintPageEventArgs e)
{
e.Graphics.DrawImage(imagenFrontal, 0, 0, 372, 235);
e.HasMorePages = false;
}
private void imprimirDocumentoTrasero(System.Object sender,
System.Drawing.Printing.PrintPageEventArgs e)
{
e.Graphics.DrawImage(ImagenTrasera, 0, 0, 372, 235);
e.HasMorePages = true;
}[/code]
<br/>
.
View the full article
<br style="color:#474747; font-family:arial,verdana,tahoma,sans-serif; font-size:14px; line-height:21px; background-color:#eef4f9
<span style="color:#474747; font-family:arial,verdana,tahoma,sans-serif; font-size:14px; line-height:21px; background-color:#eef4f9 My trouble is printing. I need to print two images (2025px * 1275px) And I need to do it in to a small paper size<br style="color:#474747; font-family:arial,verdana,tahoma,sans-serif; font-size:14px; line-height:21px; background-color:#eef4f9
<span style="color:#474747; font-family:arial,verdana,tahoma,sans-serif; font-size:14px; line-height:21px; background-color:#eef4f9 2.126in * 3.386in or 54mm * 86mm (same size).<br style="color:#474747; font-family:arial,verdana,tahoma,sans-serif; font-size:14px; line-height:21px; background-color:#eef4f9
<br style="color:#474747; font-family:arial,verdana,tahoma,sans-serif; font-size:14px; line-height:21px; background-color:#eef4f9
<span style="color:#474747; font-family:arial,verdana,tahoma,sans-serif; font-size:14px; line-height:21px; background-color:#eef4f9 this is my code... but it doesnt print more than one page.<br style="color:#474747; font-family:arial,verdana,tahoma,sans-serif; font-size:14px; line-height:21px; background-color:#eef4f9
<span style="color:#474747; font-family:arial,verdana,tahoma,sans-serif; font-size:14px; line-height:21px; background-color:#eef4f9 I only have one button that calls imprimirFrontal() and the images with that resolution. <br style="color:#474747; font-family:arial,verdana,tahoma,sans-serif; font-size:14px; line-height:21px; background-color:#eef4f9
<br style="color:#474747; font-family:arial,verdana,tahoma,sans-serif; font-size:14px; line-height:21px; background-color:#eef4f9
<span style="color:#474747; font-family:arial,verdana,tahoma,sans-serif; font-size:14px; line-height:21px; background-color:#eef4f9 Do you have any ideas?? or can you help me to fix my code?<br style="color:#474747; font-family:arial,verdana,tahoma,sans-serif; font-size:14px; line-height:21px; background-color:#eef4f9
<br style="color:#474747; font-family:arial,verdana,tahoma,sans-serif; font-size:14px; line-height:21px; background-color:#eef4f9
<span style="color:#474747; font-family:arial,verdana,tahoma,sans-serif; font-size:14px; line-height:21px; background-color:#eef4f9 I want to print to a CardSize.<br style="color:#474747; font-family:arial,verdana,tahoma,sans-serif; font-size:14px; line-height:21px; background-color:#eef4f9
<br style="color:#474747; font-family:arial,verdana,tahoma,sans-serif; font-size:14px; line-height:21px; background-color:#eef4f9
<span style="color:#474747; font-family:arial,verdana,tahoma,sans-serif; font-size:14px; line-height:21px; background-color:#eef4f9 this code is for demo... only print is not working
<pre class="prettyprint private void imprimirFrontal()
{
imagenFrontal = new Bitmap("ImagenFrontal_HD.png");
ImagenTrasera = new Bitmap("ImagenTrasera_HD.png");
//2.126in x 3.386in
//54mm x 86mm
PaperSize CardSize = new PaperSize("Card", 213, 339);
//CardSize.RawKind = (int)PaperKind.Custom;
PrintDocument pd = new PrintDocument();
pd.PrinterSettings.DefaultPageSettings.PaperSize = CardSize;
pd.DefaultPageSettings.Landscape = true;
pd.PrintPage += new PrintPageEventHandler(imprimirDocumentoTrasero);
pd.PrintPage += new PrintPageEventHandler(imprimirDocumentoFrontal);
PrintPreviewDialog previewDialog = new PrintPreviewDialog();
previewDialog.Document = pd;
previewDialog.ShowDialog();
//pd.Print();
}
private void imprimirDocumentoFrontal(System.Object sender,
System.Drawing.Printing.PrintPageEventArgs e)
{
e.Graphics.DrawImage(imagenFrontal, 0, 0, 372, 235);
e.HasMorePages = false;
}
private void imprimirDocumentoTrasero(System.Object sender,
System.Drawing.Printing.PrintPageEventArgs e)
{
e.Graphics.DrawImage(ImagenTrasera, 0, 0, 372, 235);
e.HasMorePages = true;
}[/code]
<br/>
.
View the full article