Spread Silverlight Documentation
GrapeCity.Windows.SpreadSheet.Data Namespace / PdfExportSettings Class / FitWindow Property
Example


In This Topic
    FitWindow Property
    In This Topic
    Gets or sets a value that specifies whether to resize the document’s window to fit the size of the first displayed page.
    Syntax
    'Declaration
     
    <DefaultValueAttribute(False)>
    Public Property FitWindow As Boolean
    'Usage
     
    Dim instance As PdfExportSettings
    Dim value As Boolean
     
    instance.FitWindow = value
     
    value = instance.FitWindow
    [DefaultValue(false)]
    public bool FitWindow {get; set;}

    Property Value

    true if the document's window is resized; otherwise, false.
    Example
    This example sets the FitWindow property.
    string fileName;
    fileName = "c:\\zipfile\\test.pdf";
    System.IO.Stream stream;
    stream = System.IO.File.Create(fileName);
    
    GrapeCity.Windows.SpreadSheet.Data.PrintInfo printtest;
    printtest = gcSpreadSheet1.Sheets[0].PrintInfo;
    printtest.FooterCenter = "This is Page &P";
    printtest.HeaderCenter = "Test &UPrint";
    printtest.BestFitColumns = true;
    printtest.UseMax = true;
    
    GrapeCity.Windows.SpreadSheet.Data.PdfExportSettings test;
    test = new GrapeCity.Windows.SpreadSheet.Data.PdfExportSettings();
    test.Title = "Print PDF";
    test.Author = "GrapeCity, Inc.";
    test.DisplayDocTitle = true;
    test.FitWindow = true;
    gcSpreadSheet1.SavePDF(stream, test, 0);
    Dim fileName As String
    fileName = "c:\zipfile\test.pdf"
    Dim stream As System.IO.Stream
    stream = System.IO.File.Create(fileName)
    
    Dim printtest As GrapeCity.Windows.SpreadSheet.Data.PrintInfo
    printtest = GcSpreadSheet1.Sheets(0).PrintInfo
    printtest.FooterCenter = "This is Page &P"
    printtest.HeaderCenter = "Test &UPrint"
    printtest.BestFitColumns = True
    printtest.UseMax = True
    
    Dim test As GrapeCity.Windows.SpreadSheet.Data.PdfExportSettings
    test = New GrapeCity.Windows.SpreadSheet.Data.PdfExportSettings()
    test.Title = "Print PDF"
    test.Author = "GrapeCity, Inc."
    test.DisplayDocTitle = True
    test.FitWindow = True
    GcSpreadSheet1.SavePDF(stream, test, 0)
    See Also