アプリケーションでドキュメントを作成および表示するために PdfSharp/MigraDoc を使用しています。
WPF ドキュメントビューアが必要なので、WPF バージョンを使用します。ドキュメントを印刷したいのですが (これは DocumentViewer から機能します)、自分で印刷しようとすると、何らかの理由で空のページしか表示されません。
このコードを使用して印刷します。
MigraDocPrintDocument printDocument = new MigraDocPrintDocument();
printDocument.Renderer = new DocumentRenderer(druck.GetDruck());
printDocument.Renderer.PrepareDocument();
printDocument.Print();
WPF から印刷するにはどうすればよいですか (WinForms からはうまくいきましたが、DocumentViewer には WPF が必要です)。