How to Print Preview when using a DocumentPaginator to print?
So I got it working after reading Pro WPF in C# 2008 (Page 726). Basically the DocumentViewer class needs an XPS file to present a print preview of it. So I do the following: PrintDialog dialog = new PrintDialog(); var paginator = new RowPaginator(rowsToPrint) { PageSize = new Size(dialog.PrintableAreaWidth, dialog.PrintableAreaHeight) }; string tempFileName = System.IO.Path.GetTempFileName(); … Read more