コード例 #1
0
        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);
            //}
        }
コード例 #2
0
 public void Show()
 {
     pdfDocSource.LoadFromStream(PdfUtils.SaveToStream(this.PdfDocument));
     base.Title = string.Format("PDF Viewer | {0}", this.PdfDocument.DocumentInfo.Title);
     base.Show();
 }