Spread ASP.NET 6.0 Product Documentation
PrintPDF Event
See Also  Example Send Feedback
FarPoint.Web.Spread Assembly > FarPoint.Web.Spread Namespace > FpSpread Class : PrintPDF Event


Glossary Item Box

Occurs before print spread to PDF.

Syntax

Visual Basic (Declaration) 
Public Event PrintPDF As PrintPDFEventHandler
Visual Basic (Usage)Copy Code
Dim instance As FpSpread
Dim handler As PrintPDFEventHandler
 
AddHandler instance.PrintPDF, handler
C# 
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.

PropertyDescription
PdfFileName Gets or Sets the PDF File Name.
SheetIndex Gets the index of the sheet to print.

Example

This example uses the PrintPDF event.
C#Copy Code
fpSpread1.Commandbar.ShowPDFButton = true;

protected void FpSpread1_PrintPDF(object sender, FarPoint.Web.Spread.PrintPDFEventArgs e)
{
e.PdfFileName = "NewPdfFileName.pdf";
}
Visual BasicCopy Code
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

Requirements

Target Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family, Windows Vista, Windows Server 2008 family

See Also

© 2002-2012 GrapeCity, Inc. All Rights Reserved.