Spread ASP.NET 16
Spread for ASP.NET 16 Product Documentation / Developer's Guide / Managing File Operations / Saving Data to a File / Saving to a PDF File / Setting PrintInfo Class Properties
In This Topic
    Setting PrintInfo Class Properties
    In This Topic

    You can set properties for the PrintInfo class that are used when saving to a PDF file. You can specify titles, headers, footers, and many other options with the PrintInfo class.

    The properties in this class are only available when saving to a PDF file.

    The ShowColumnHeader and ShowRowHeader properties in the PrintInfo class apply when printing or saving to PDF.

    You can also specify smart print options. See Setting Smart Print Options for more information.

    Using Code

    Set the PrintInfo class properties and then use the SavePdf method.

    Example

    This example code sets the orientation before saving to PDF.

    C#
    Copy Code
    FarPoint.Web.Spread.PrintInfo pi = new FarPoint.Web.Spread.PrintInfo();
    pi.Orientation = FarPoint.Web.Spread.PrintOrientation.Landscape;
    FpSpread1.Sheets[0].PrintInfo = pi;
    FpSpread1.SavePdf("c:\\test.pdf"); 
    
    VB
    Copy Code
    Dim pi As New FarPoint.Web.Spread.PrintInfo()
    pi.Orientation = FarPoint.Web.Spread.PrintOrientation.Landscape
    FpSpread1.Sheets(0).PrintInfo = pi
    FpSpread1.SavePdf("c:\test.pdf")