# Providing a Preview of the Printing

Learn how to use the Print Preview feature in Spread.NET to allow end users to preview and modify spreadsheets before printing.

## Content

You can preview what the printed pages will look like for a sheet and you can allow your end user to preview the printing.
You can use the [Preview](/spreadnet/api/latest/online-win/FarPoint.Win.Spread/FarPoint.Win.Spread.PrintInfo.Preview.html) property in the [PrintInfo](/spreadnet/api/latest/online-win/FarPoint.Win.Spread/FarPoint.Win.Spread.PrintInfo.html) class to preview a sheet.
The following image shows the basic Print Preview Dialog that appears on your screen.
![Print Preview Dialog](https://cdn.mescius.io/document-site-files/images/2238e618-a1fb-45a6-9ce5-9a4157bd2931/images/basicpreview.png)
Use the [OwnerPrintDraw](/spreadnet/api/latest/online-win/FarPoint.Win.Spread/FarPoint.Win.Spread.FpSpread.OwnerPrintDraw.html) method of the [FpSpread](/spreadnet/api/latest/online-win/FarPoint.Win.Spread/FarPoint.Win.Spread.FpSpread.html) class to provide a print preview dialog with options for previewing the pages before printing.
Use the [ShowPageSetupButton](/spreadnet/api/latest/online-win/FarPoint.Win.Spread/FarPoint.Win.Spread.PrintInfo.ShowPageSetupButton.html) property of the [PrintInfo](/spreadnet/api/latest/online-win/FarPoint.Win.Spread/FarPoint.Win.Spread.PrintInfo.html) class to show the PageSetUp button on the toolbar of the Print Preview Dialog. With this button, you can set the orientation (portrait and landscape) and margins etc. of the page you want to print.
Two additional printing features are: the [PrintPreviewShowing](/spreadnet/api/latest/online-win/FarPoint.Win.Spread/FarPoint.Win.Spread.FpSpread.PrintPreviewShowing.html) event and the ability to set your own print preview dialog with the [SetPrintPreview](/spreadnet/api/latest/online-win/FarPoint.Win.Spread/FarPoint.Win.Spread.FpSpread.SetPrintPreview.html) method (and the corresponding [GetPrintPreview](/spreadnet/api/latest/online-win/FarPoint.Win.Spread/FarPoint.Win.Spread.FpSpread.GetPrintPreview.html) method), all members of the [FpSpread](/spreadnet/api/latest/online-win/FarPoint.Win.Spread/FarPoint.Win.Spread.FpSpread.html) class. The [PrintPreviewShowing](/spreadnet/api/latest/online-win/FarPoint.Win.Spread/FarPoint.Win.Spread.FpSpread.PrintPreviewShowing.html) event fires prior to displaying the dialog and supplies you with both the *PreviewDialog* and the *PreviewControl* in its event parameter list so you can make on-the-fly modifications to the **PrintPreviewDialog** and the **PrintPreviewControl** objects.
The print preview dialog allows you to zoom in and out to change the scale of what you see in the preview. You can set the preview to display one, two, four, or six pages of the spreadsheet per printed page. You can print from the print preview dialog or close the dialog when done.
You can also print and preview the printing within the Spread Designer. For more information on printing and previewing in Spread Designer, refer to [Printing a Sheet from Spread Designer](/spreadnet/docs/latest/online-win/overview/spwin-designerguide/spwin-spd-using/spwin-spd-printsheet) and [Previewing a Sheet in Spread Designer](/spreadnet/docs/latest/online-win/overview/spwin-designerguide/spwin-spd-using/spwin-spd-previewsheet).
You can also customize the Print Preview settings to show the Print Preview Dialog like Excel. For more information, refer to [Customizing the Print Preview Dialog](/spreadnet/docs/latest/online-win/overview/spwin-devguide/spwin-printing/spwin-printcustomize/CustomizingthePrintPreviewDialog).

## Using Code

Set the [Preview](/spreadnet/api/latest/online-win/FarPoint.Win.Spread/FarPoint.Win.Spread.PrintInfo.Preview.html) property of the [PrintInfo](/spreadnet/api/latest/online-win/FarPoint.Win.Spread/FarPoint.Win.Spread.PrintInfo.html) class to true in order to allow users to preview spreadsheets and see the modifications concurrently while the settings of the printer are being changed.

## Example

This example shows how to apply printer setting to show the print preview dialog.

```csharp
//Code to show the print preview dialog

fpSpread1.ActiveSheet.Cells[1, 1].Value = "1,1";
fpSpread1.ActiveSheet.Cells[10, 10].Value = "10,10";
fpSpread1.ActiveSheet.PrintInfo.Preview = true;
fpSpread1.PrintSheet(fpSpread1.ActiveSheet);
```

```vbnet
'Code to show print preview dialog
fpSpread1.ActiveSheet.Cells(1, 1).Value = "1,1"
fpSpread1.ActiveSheet.Cells(10, 10).Value = "10,10"
fpSpread1.ActiveSheet.PrintInfo.Preview = True
fpSpread1.PrintSheet(fpSpread1.ActiveSheet)
```

## See Also

[Displaying a Print Dialog for the User](/spreadnet/docs/latest/online-win/overview/spwin-devguide/spwin-printing/spwin-printuser/spwin-printdialog)
[Displaying an Abort Message for the User](/spreadnet/docs/latest/online-win/overview/spwin-devguide/spwin-printing/spwin-printuser/spwin-printabortdialog)