c# multiple image-page print
making a credential software
My trouble is printing. I need to print two images (2025px * 1275px) And I need to do it in to a small paper size
2.126in * 3.386in or 54mm * 86mm (same size).
this is my code... but it doesnt print more than one page.
I only have one button that calls imprimirFrontal() and the images with that resolution.
Do you have any ideas?? or can you help me to fix my code?
I want to print to a CardSize.
this code is for demo... only print is not working
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;
}






Cartoon Clouds
Mountains
Sunrise
Clouds
Green Clouds
None












Help