I am trying to print via .NET with the following code....
http://support.microsoft.com/kb/322091
OpenFileDialog ofd = new OpenFileDialog();
if( DialogResult.OK == ofd.ShowDialog(this) )
{
// Allow the user to select a printer.
PrintDialog pd = new PrintDialog();
pd.PrinterSettings = new PrinterSettings();
if( DialogResult.OK == pd.ShowDialog(this) )
{
// Print the file to the printer.
RawPrinterHelper.SendFileToPrinter(pd.PrinterSettings.PrinterName, ofd.FileName);
}
}
The printer dialog window opens, and the print job is in the queue, however, nothing prints... and I can print otherwise.
See the Print()
extension method here: https://stackoverflow.com/a/5751106/353147