-----------------------------------------------------------

New Message on BDOTNET

-----------------------------------------------------------
From: thinkindotnet
Message 1 in Discussion

Hi folks, I wanted to print a PDF by showing the Print Dialog. I am using the 
PrintDialog and PrintDocument controls
Here is the code which I use 
/**********************************************************************************/
System.IO.StreamReader streamToPrint = new System.IO.StreamReader("C:\\MyFile.pdf"); 
try
{
 PrintDialog printDialog1 = new PrintDialog();
 printDialog1.Document = printDocument1;
 printDialog1.AllowSomePages=true;
 printDialog1.AllowSelection=true;
 printDocument1.DefaultPageSettings.PaperSource = 
printDocument1.PrinterSettings.PaperSources[0];
 DialogResult result = printDialog1.ShowDialog();
 if (result == DialogResult.OK)
 {
  printDocument1.Print();
 }
}
finally
{
 streamToPrint.Close(); 
} 
/**********************************************************************************/ I 
am always getting a blank page getting printed..What could be the reason.?.  Pls. 
reply. Thanks,
Suki

-----------------------------------------------------------

To stop getting this e-mail, or change how often it arrives, go to your E-mail 
Settings.
http://groups.msn.com/BDotNet/_emailsettings.msnw

Need help? If you've forgotten your password, please go to Passport Member Services.
http://groups.msn.com/_passportredir.msnw?ppmprop=help

For other questions or feedback, go to our Contact Us page.
http://groups.msn.com/contact

If you do not want to receive future e-mail from this MSN group, or if you received 
this message by mistake, please click the "Remove" link below. On the pre-addressed 
e-mail message that opens, simply click "Send". Your e-mail address will be deleted 
from this group's mailing list.
mailto:[EMAIL PROTECTED]

Reply via email to