0

次のコードを使用して.NET経由で印刷しようとしています。

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);
    }
}

プリンタダイアログウィンドウが開き、印刷ジョブがキューにありますが、何も印刷されません...それ以外の場合は印刷できます。

4

1 に答える 1

1

Print()ここで拡張方法を参照してください: https ://stackoverflow.com/a/5751106/353147

于 2012-04-03T22:30:15.810 に答える