Spread WPF 18
GrapeCity.Wpf.SpreadSheet Namespace / GcSpreadSheet Class / PrintToDocument Method
An integer value indicates the printing worksheet. The default value -1 means the entire workbook is printed.
The print settings.


In This Topic
    PrintToDocument Method
    In This Topic
    Prints the GcSpreadSheett to a document which can be displayed by System.Windows.Controls.DocumentViewer control.
    Syntax
    'Declaration
     
    Public Function PrintToDocument( _
       Optional ByVal sheetIndex As Integer, _
       Optional ByVal printSettings As PrintSettings _
    ) As IDocumentPaginatorSource
    'Usage
     
    Dim instance As GcSpreadSheet
    Dim sheetIndex As Integer
    Dim printSettings As PrintSettings
    Dim value As IDocumentPaginatorSource
     
    value = instance.PrintToDocument(sheetIndex, printSettings)
    public IDocumentPaginatorSource PrintToDocument( 
       int sheetIndex,
       PrintSettings printSettings
    )

    Parameters

    sheetIndex
    An integer value indicates the printing worksheet. The default value -1 means the entire workbook is printed.
    printSettings
    The print settings.

    Return Value

    A System.Windows.Documents.IDocumentPaginatorSource object that contains paginated content and can displayed by System.Windows.Controls.DocumentViewer control.
    See Also