Skip to main content

PrintTool.PreviewForm Property

Provides access to a Print Preview form of the PrintTool.

Namespace: DevExpress.XtraPrinting

Assembly: DevExpress.XtraPrinting.v24.1.dll

NuGet Packages: DevExpress.Win.Navigation, DevExpress.Win.Printing

Declaration

public PrintPreviewFormEx PreviewForm { get; }

Property Value

Type Description
PrintPreviewFormEx

A PrintPreviewFormEx object.

Example

The example below illustrates how to define a document scale factor in the Print Preview.

using System;
using System.Windows.Forms;
using DevExpress.XtraPrinting;
using DevExpress.XtraReports.UI;
using DevExpress.XtraPrinting.Preview;
// ...

private void button1_Click(object sender, EventArgs e) {
    ReportPrintTool printTool = new ReportPrintTool(new XtraReport1());
    printTool.PreviewForm.Load += new EventHandler(PreviewForm_Load);
    printTool.ShowPreviewDialog();
}

void PreviewForm_Load(object sender, EventArgs e) {
    PrintPreviewFormEx frm = (PrintPreviewFormEx)sender;
    frm.PrintingSystem.ExecCommand(PrintingSystemCommand.Scale, new object[] { 0.7f });
}
See Also