New to Telerik Document Processing? Start a free 30-day trial

Provides methods for calculating the scale factor required to fit worksheet content into a specified number of pages during printing or PDF export.

Definition

Namespace:Telerik.Documents.Spreadsheet.Layout

Assembly:Telerik.Windows.Documents.Spreadsheet.dll

Syntax:

C#
public static class PageScaleFactorCalculator

Inheritance: objectPageScaleFactorCalculator

Methods

Calculates the maximum scale factor for the specified ranges to fit within the page counts specified by FitToPagesWide and FitToPagesTall.

C#
public static Size CalculateScaleAccordingToFitToPages(Worksheet worksheet, IEnumerable<CellRange> includedRanges)
Parameters:worksheetWorksheet

The worksheet.

includedRangesIEnumerable<CellRange>

All the ranges that will be included in the page.

Returns:

Size

The resulting scale factor.

Calculates the maximum scale factor for the worksheet to fit within the page counts specified by FitToPagesWide and FitToPagesTall.

C#
public static Size CalculateScaleAccordingToFitToPages(Worksheet worksheet)
Parameters:worksheetWorksheet

The worksheet.

Returns:

Size

The resulting scale factor.