예제 #1
0
        private void ShowPreviewWithUserControl(AbstractRenderer renderer, double zoomFaktor)
        {
            System.Drawing.Printing.PrintDocument doc = renderer.ReportDocument;
            //doc.PrintController = new ExtendedPrintController(new System.Drawing.Printing.PreviewPrintController());

//			doc.Print();

            printPreviewControl1.InvalidatePreview();
            printPreviewControl1.Document = null;
            printPreviewControl1.Document = doc;

            printPreviewControl1.Zoom = zoomFaktor;
            printPreviewControl1.Document.DocumentName = renderer.ReportSettings.ReportName;
            printPreviewControl1.UseAntiAlias          = true;
        }
예제 #2
0
        /// <summary>
        /// Initialize the preview area with new document settings.
        /// </summary>
        private void resetPreviewArea()
        {
            // print the document again
            PrintDocument doc = Document;

            Document = null;
            Document = doc;

            // move to the first page
            PreviewArea.StartPage = 0;
            PageRange.Text        = (PreviewArea.StartPage + 1).ToString();
            PreviewArea.InvalidatePreview();
        }
예제 #3
0
 protected override void OnClosing(CancelEventArgs e)
 {
     print_preview.InvalidatePreview();
     base.OnClosing(e);
 }