Skip to main content

PrintTool.PreviewForm Property

Provides access to a Print Preview form of the PrintTool.

Namespace: DevExpress.XtraPrinting

Assembly: DevExpress.XtraPrinting.v23.1.dll

NuGet Package: DevExpress.Win.Printing


public PrintPreviewFormEx PreviewForm { get; }

Property Value

Type Description

A PrintPreviewFormEx object.


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);

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