Xsemmel/PrintEngine/PrintPreviewControl.xaml.cs
/// <summary>
/// Loads the specified DocumentPaginatorWrapper document for print preview.
/// </summary>
Loads the specified DocumentPaginatorWrapper document for print preview.
Loads the specified DocumentPaginatorWrapper document for print preview .
public void LoadDocument(DocumentPaginatorWrapper document)
        {
            string temp = Path.GetTempFileName();
            if (File.Exists(temp))
                File.Delete(temp);
            XpsDocument xpsDoc = new XpsDocument(temp, FileAccess.ReadWrite);
            XpsDocumentWriter xpsWriter = XpsDocument.CreateXpsDocumentWriter(xpsDoc);
            xpsWriter.Write(document);
            _documentViewer.Document = xpsDoc.GetFixedDocumentSequence();
            xpsDoc.Close();
        }
public void LoadDocument ( DocumentPaginatorWrapper document ) { string temp = Path . GetTempFileName ( ) ; if ( File . Exists ( temp ) ) File . Delete ( temp ) ; XpsDocument xpsDoc = new XpsDocument ( temp , FileAccess . ReadWrite ) ; XpsDocumentWriter xpsWriter = XpsDocument . CreateXpsDocumentWriter ( xpsDoc ) ; xpsWriter . Write ( document ) ; _documentViewer . Document = xpsDoc . GetFixedDocumentSequence ( ) ; xpsDoc . Close ( ) ; }
Loads the specified DocumentPaginatorWrapper document for print preview.
Loads the specified DocumentPaginatorWrapper document for print preview .
document
DocumentPaginatorWrapper
<not_specific>