printing

G

Guest

I am unable to figure out why this code does not work....it never prints
anything nor throws an exception.

PrintDialog dlg = new PrintDialog();
if (dlg.ShowDialog() == DialogResult.OK)
{
thread = new Thread(new ThreadStart(Print));
thread.Start();
}

public void Print()
{
Printer.PrintPages(pageParameters, dlg);
}

Printer.PrintPages is static method where I do some processing before print
document is generated

then from this method I call another static method

public static void PrintImages(byte[][] images, PrintDialog dlg)
{
// printDocument is assigned to some doc generated intenally
dlg.Document = printDocument;
dlg.Document.Print();
dlg.Dispose();
}


Thanks
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top