public static void Save(this C1PdfDocument pdf) { var pdfDocSource = new C1PdfDocumentSource(); var flexViewer = new C1FlexViewer(); flexViewer.DocumentSource = pdfDocSource; pdfDocSource.LoadFromStream(PdfUtils.SaveToStream(pdf)); //var dlg = new SaveFileDialog(); //dlg.DefaultExt = ".pdf"; //var dr = dlg.ShowDialog(); //if (!dr.HasValue || !dr.Value) //{ // return; //} //using (var stream = dlg.OpenFile()) //{ // pdf.Save(stream); //} }
public void Show() { pdfDocSource.LoadFromStream(PdfUtils.SaveToStream(this.PdfDocument)); base.Title = string.Format("PDF Viewer | {0}", this.PdfDocument.DocumentInfo.Title); base.Show(); }