Spread ASP.NET 14
FarPoint.Web.Spread Assembly / FarPoint.Web.Spread Namespace / FpSpread Class / PrintPDF Event

In This Topic
    PrintPDF Event
    In This Topic
    Occurs before printing spread to PDF.
    Public Event PrintPDF As PrintPDFEventHandler
    Dim instance As FpSpread
    Dim handler As PrintPDFEventHandler
    AddHandler instance.PrintPDF, handler
    public event PrintPDFEventHandler PrintPDF
    Event Data

    The event handler receives an argument of type PrintPDFEventArgs containing data related to this event. The following PrintPDFEventArgs properties provide information specific to this event.

    Gets or sets the PDF file name.  
    Gets the index of the sheet to print.  
    This example uses the PrintPDF event.
    fpSpread1.Commandbar.ShowPDFButton = true;
    protected void FpSpread1_PrintPDF(object sender, FarPoint.Web.Spread.PrintPDFEventArgs e)
    e.PdfFileName = "NewPdfFileName.pdf";
    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
            FpSpread1.CommandBar.ShowPDFButton = True
        End Sub
        Protected Sub FpSpread1_PrintPDF(ByVal sender As Object, ByVal e As FarPoint.Web.Spread.PrintPDFEventArgs) Handles FpSpread1.PrintPDF
            e.PdfFileName = "NewPdfFileName.pdf"
        End Sub
    See Also