public void PrintPreview(IDocument document)
        {
            DocumentPaginator documentPaginator = new XpsPrintingDocumentPaginator(document);
            using (var xpsWrapper = new InProcXpsDocumentWrapper())
            {
                XpsDocumentWriter xpsWriter = XpsDocument.CreateXpsDocumentWriter(xpsWrapper.Document);
                xpsWriter.Write(documentPaginator);

                ShowXpsPreview(xpsWrapper.Document);
            }
        }
Beispiel #2
0
        public void PrintPreview(IDocument document)
        {
            DocumentPaginator documentPaginator = new XpsPrintingDocumentPaginator(document);

            using (var xpsWrapper = new InProcXpsDocumentWrapper())
            {
                XpsDocumentWriter xpsWriter = XpsDocument.CreateXpsDocumentWriter(xpsWrapper.Document);
                xpsWriter.Write(documentPaginator);

                ShowXpsPreview(xpsWrapper.Document);
            }
        }