[]
        
(Showing Draft Content)

GrapeCity.Documents.Excel.PrintManager.GeneratePageContentInfo

GeneratePageContentInfo Method

GeneratePageContentInfo(IRange, SizeF, int, int, bool, bool)

Returns a PageContentInfo object for the specified print area and page size.

The result is calculated from the supplied start row, start column, available size, and row and column header visibility settings.

Declaration
public PageContentInfo GeneratePageContentInfo(IRange printArea, SizeF availableSize, int rowStart, int columnStart, bool rowHeaderVisible, bool columnHeaderVisible)
Public Function GeneratePageContentInfo(printArea As IRange, availableSize As SizeF, rowStart As Integer, columnStart As Integer, rowHeaderVisible As Boolean, columnHeaderVisible As Boolean) As PageContentInfo
Parameters
Type Name Description
IRange printArea

The print area to evaluate. Must not be null.

SizeF availableSize

The page content size excluding margins. Must not be null.

int rowStart

The zero-based start row index used to calculate the ending row.

int columnStart

The zero-based start column index used to calculate the ending column.

bool rowHeaderVisible

Whether the row header is printed with this page.

bool columnHeaderVisible

Whether the column header is printed with this page.

Returns
Type Description
PageContentInfo

A PageContentInfo object that describes the calculated page content.

Examples
worksheet.Range["A1:C5"].Value = new object[,]
{
    { "Name", "Value", "Status" },
    { "Test", 100, "Ready" }
};

PrintManager printManager = new PrintManager();
PageContentInfo info = printManager.GeneratePageContentInfo(
    worksheet.Range["A1:C5"], new SizeF(400, 300), 0, 0, true, false);