officefileapi-devexpress-dot-spreadsheet-dot-worksheetprintoptions-836d95fc.md
Gets or sets the number of pages by height in which the worksheet shall fit when printed.
Namespace : DevExpress.Spreadsheet
Assembly : DevExpress.Spreadsheet.v25.2.Core.dll
NuGet Package : DevExpress.Spreadsheet.Core
int FitToHeight { get; set; }
Property FitToHeight As Integer
| Type | Description |
|---|---|
| Int32 |
A positive integer value that specifies a number of pages in which the worksheet will fit.
|
You can access this nested property as listed below:
| Object Type | Path to FitToHeight |
|---|---|
| Worksheet |
.PrintOptions .FitToHeight
|
To scale the content to fit on a specific number of pages by height, set the WorksheetPrintOptions.FitToPage property to true and specify the desired number of pages in the FitToHeight property.
The following code snippet (auto-collected from DevExpress Examples) contains a reference to the FitToHeight property.
Note
The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.
Sheet.PrintOptions.FitToWidth = 1;
Sheet.PrintOptions.FitToHeight = 0;
}
See Also