# Saving to PDF Methods

Spread for ASP.NET provides you various methods to save to a PDF file. You can also customize the appearance of the PDF file.

## Content

You can use one of the [SavePdf](/spreadnet/api/latest/online-asp/FarPoint.Web.Spread/FarPoint.Web.Spread.FpSpread.SavePdf.html) methods or one of the [SavePdfToResponse](/spreadnet/api/latest/online-asp/FarPoint.Web.Spread/FarPoint.Web.Spread.FpSpread.SavePdfToResponse.html) methods to save to a PDF file. The former saves the Spread control to the specified PDF file. The latter saves Spread to the specified response object in PDF format.
You can customize the appearance of the PDF file using the [PrintInfo](/spreadnet/api/latest/online-asp/FarPoint.Web.Spread/FarPoint.Web.Spread.PrintInfo.html) class settings for the component, including whether the pages in the PDF file are portrait or landscape. The [PrintInfo](/spreadnet/api/latest/online-asp/FarPoint.Web.Spread/FarPoint.Web.Spread.PrintInfo.html) class is only used when saving to a PDF file.
You can also save a file from inside Spread Designer (**File** menu, **Print**, **SaveToPDF**).
You can specify page breaks with the column [PageBreak](/spreadnet/api/latest/online-asp/FarPoint.Web.Spread/FarPoint.Web.Spread.Column.PageBreak.html) property or the row [PageBreak](/spreadnet/api/latest/online-asp/FarPoint.Web.Spread/FarPoint.Web.Spread.Row.PageBreak.html) property.

## Using Code

Use the [SavePdf](/spreadnet/api/latest/online-asp/FarPoint.Web.Spread/FarPoint.Web.Spread.FpSpread.SavePdf.html) method.

## Example

This example saves to PDF with the [SavePdf](/spreadnet/api/latest/online-asp/FarPoint.Web.Spread/FarPoint.Web.Spread.FpSpread.SavePdf.html) method.

```csharp
FpSpread1.SavePdf("c:\\test.pdf");
```

```vbnet
FpSpread1.SavePdf("c:\test.pdf")
```

## Using the Spread Designer

1. Select the **File** menu.
2. Choose the **Print** option.
3. Choose the **SaveToPDF** option.
4. For the **Save As** type, select PDF files (.PDF).
5. Specify the path and file name to which to save the file, and then click **Save**.
6. Click **OK** to close the Spread Designer.

## See Also

[Setting PrintInfo Class Properties](/spreadnet/docs/latest/online-asp/overview/spweb-devguide/spweb-fileops/spweb-filesave/spweb-filesave-pdf/spweb-pdfpapersize)
[Setting PDF Security Options](/spreadnet/docs/latest/online-asp/overview/spweb-devguide/spweb-fileops/spweb-filesave/spweb-filesave-pdf/spweb-commandpdf)