以下で発生している印刷の問題について、誰かが正しい方向に向けてくれることを願っています。
セットアップ: Win CE 5.0 カスタム アプリケーションから印刷しようとしています。
私は自分のアプリケーションで、pcl ドライバーを使用して HP USB プリンターに印刷する非常に単純な印刷クラスを作成しました。通常の状況では印刷面は問題ありませんが、プリンターに用紙がないなどのエラー状態を処理する明白な方法がわかりません。
私はこのようなことをしています(一般的なエラーチェックと他の詳細は明確にするために削除されています):
// Get a DC to the printer. If printer isn't powered this will fail -
can print error stating "printer not found" or similar
hdcPrinter = CreateDC(@"pcl.dll", @"PCL Inkjet", @"LPT2:", ref mode);
// Signal the start of a document
StartDoc(hdcPrinter, &docInfo)
// Signal the start of a page
StartPage(hdcPrinter)
// Prepare the page to print/formatting etc
// Finished preparing the page
EndPage(hdcPrinter)
// This is the only page we are printing this time
EndDoc(hdcPrinter)
// Return the printer DC to the system as we are finished with it now.
DeleteDC(hdcPrinter);
ご協力いただきありがとうございます。
シルパ