Spread for ASP.NET 10 Product Documentation > Developer's Guide > Managing File Operations > Saving Data to a File > Saving to a PDF File > Saving to PDF Methods |
You can use one of the SavePdf methods or one of the SavePdfToResponse 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 class settings for the component, including whether the pages in the PDF file are portrait or landscape. The PrintInfo 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 property or the row PageBreak property.
Use the SavePdf method.
This example saves to PDF with the SavePdf method.
C# |
Copy Code
|
---|---|
FpSpread1.SavePdf("c:\\test.pdf");
|
VB |
Copy Code
|
---|---|
FpSpread1.SavePdf("c:\test.pdf")
|