[]
        
(Showing Draft Content)

GrapeCity.Documents.Excel.PrintManager

Class PrintManager

Namespace
GrapeCity.Documents.Excel
Assembly
GcDocs.Excel.dll

Represents a print settings class.

public class PrintManager
Inheritance
object
PrintManager
Inherited Members
object.ToString()
object.Equals(object)
object.Equals(object, object)
object.ReferenceEquals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()

Constructors

PrintManager()

public PrintManager()

Methods

AppendPage(GcPdfDocument, PageInfo, PdfSaveOptions)

Append the page info to the specified pdf document.

public void AppendPage(GcPdfDocument doc, PageInfo pageInfo, PdfSaveOptions options = null)

Parameters

doc GrapeCity.Documents.Pdf.GcPdfDocument

The specified GcPdfDocument.

pageInfo PageInfo

The printed page info.

options PdfSaveOptions

Options for saving pdf file.

Draw(Page, IList<PageInfo>, int, int, Order, PdfSaveOptions)

Draw the pages in the page collection on a page in a certain direction.

public void Draw(Page page, IList<PageInfo> pages, int rows, int columns, Order order = Order.OverThenDown, PdfSaveOptions options = null)

Parameters

page GrapeCity.Documents.Pdf.Page

The page in a GcPdfDocument.

pages System.Collections.Generic.IList<T><PageInfo>

The page collection.

rows int

The number of rows that these pages will be divided into.

columns int

The number of columns that these pages will be divided into.

order Order

The direction used to arrange the pages.

options PdfSaveOptions

Options for saving pdf file.

Draw(Page, PointF, IRange, PdfSaveOptions)

Draw the range data to the specific location in a specified pdf page.

public void Draw(Page page, PointF location, IRange range, PdfSaveOptions options = null)

Parameters

page GrapeCity.Documents.Pdf.Page

The page in a GcPdfDocument.

location System.Drawing.PointF

The location of the range data to be drawn.

range IRange

The print data range.

options PdfSaveOptions

Options for saving pdf file.

Draw(Page, RectangleF, IRange, PdfSaveOptions)

Draw the range data to the specific location in a specified pdf page.

public void Draw(Page page, RectangleF rect, IRange range, PdfSaveOptions options = null)

Parameters

page GrapeCity.Documents.Pdf.Page

The page in a GcPdfDocument.

rect System.Drawing.RectangleF

The location and size of the range data to be drawn.

range IRange

The print data range.

options PdfSaveOptions

Options for saving pdf file.

Draw(Page, RectangleF, PageContentInfo, PdfSaveOptions)

Draw the page info to the specific location in a specified pdf page.

public void Draw(Page page, RectangleF rect, PageContentInfo pageContent, PdfSaveOptions options = null)

Parameters

page GrapeCity.Documents.Pdf.Page

The page in a GcPdfDocument.

rect System.Drawing.RectangleF

The location and size of the data to be drawn.

pageContent PageContentInfo

The printed page content info.

options PdfSaveOptions

Options for saving pdf file.

Draw(Page, RectangleF, PageInfo, PdfSaveOptions)

Draw the page info to the specific location in a specified pdf page.

public void Draw(Page page, RectangleF rect, PageInfo pageInfo, PdfSaveOptions options = null)

Parameters

page GrapeCity.Documents.Pdf.Page

The page in a GcPdfDocument.

rect System.Drawing.RectangleF

The location and size of the data to be drawn.

pageInfo PageInfo

The printed page info.

options PdfSaveOptions

Options for saving pdf file.

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

Returns a PageContentInfo object.

public PageContentInfo GeneratePageContentInfo(IRange printArea, SizeF availableSize, int rowStart, int columnStart, bool rowHeaderVisible, bool columnHeaderVisible)

Parameters

printArea IRange

The print area.

availableSize System.Drawing.SizeF

The size that excludes the margins.

rowStart int

The start row index which is used to calculate the RowEnd.

columnStart int

The start column index which is used to calculate the ColumnEnd.

rowHeaderVisible bool

True if the row header is printed with this page.

columnHeaderVisible bool

True if the column header is printed with this page.

Returns

PageContentInfo

GetPaginationInfo(IWorksheet, PaginationOrientation, IList<IRange>, IList<RepeatSetting>)

Returns an array of row or column indexes which represents the page boundaries for vertical or horizontal paging. The Pagination is based on the settings in the PageSetup of the current worksheet.

public IList<int> GetPaginationInfo(IWorksheet worksheet, PaginationOrientation orientation, IList<IRange> keepTogetherRanges, IList<RepeatSetting> repeatSettings)

Parameters

worksheet IWorksheet

The worksheet object.

orientation PaginationOrientation

The orientation of pagination.

keepTogetherRanges System.Collections.Generic.IList<T><IRange>

The collection of ranges that need to keep together.

repeatSettings System.Collections.Generic.IList<T><RepeatSetting>

The collection of repeat settings for a Range.

Returns

System.Collections.Generic.IList<T><int>

GetPaginationInfo(IWorksheet, PaginationOrientation)

Returns an array of row or column indexes which represents the page boundaries for vertical or horizontal paging. The Pagination is based on the settings in the PageSetup of the current worksheet.

public IList<int> GetPaginationInfo(IWorksheet worksheet, PaginationOrientation orientation)

Parameters

worksheet IWorksheet

The worksheet object.

orientation PaginationOrientation

The orientation of pagination.

Returns

System.Collections.Generic.IList<T><int>

GetPrintAreas(IWorksheet)

Returns the ranges of the worksheet to be printed.

public IList<IRange> GetPrintAreas(IWorksheet worksheet)

Parameters

worksheet IWorksheet

The worksheet object.

Returns

System.Collections.Generic.IList<T><IRange>

GetShrinkToFitFontSize(IRange, PdfSaveOptions)

Gets the best shrink-to-fit font size of the upper-left cell.

public double GetShrinkToFitFontSize(IRange range, PdfSaveOptions options)

Parameters

range IRange

The range to be printed.

options PdfSaveOptions

Options for saving pdf file.

Returns

double

The font size to apply for shrinking text to fit within the range.

GetSize(IRange)

Returns the print size of the range.

public SizeF GetSize(IRange range)

Parameters

range IRange

The range object.

Returns

System.Drawing.SizeF

GetSize(PageContentInfo)

Returns the size of the PageContentInfo.

public SizeF GetSize(PageContentInfo contentInfo)

Parameters

contentInfo PageContentInfo

The PageContentInfo object.

Returns

System.Drawing.SizeF

HasPrintContent(IRange)

Returns whether there has content to print.

public bool HasPrintContent(IRange range)

Parameters

range IRange

The printed range of a page.

Returns

bool

Paginate(IRange)

Generate pagination information for the range.

public IList<PageInfo> Paginate(IRange printArea)

Parameters

printArea IRange

The area will be paginated.

Returns

System.Collections.Generic.IList<T><PageInfo>

Paginate(IWorkbook)

Generate pagination informations for all worksheets in the workbook.

public IList<PageInfo> Paginate(IWorkbook workbook)

Parameters

workbook IWorkbook

The workbook object.

Returns

System.Collections.Generic.IList<T><PageInfo>

Paginate(IWorksheet, IList<IRange>, IList<RepeatSetting>)

Generate pagination information for the worksheet.

public IList<PageInfo> Paginate(IWorksheet worksheet, IList<IRange> keepTogetherRanges, IList<RepeatSetting> repeatSettings)

Parameters

worksheet IWorksheet

The worksheet object.

keepTogetherRanges System.Collections.Generic.IList<T><IRange>

The collection of ranges that need to keep together.

repeatSettings System.Collections.Generic.IList<T><RepeatSetting>

The collection of repeat settings for a Range.

Returns

System.Collections.Generic.IList<T><PageInfo>

Paginate(IWorksheet)

Generate pagination information for the worksheet.

public IList<PageInfo> Paginate(IWorksheet worksheet)

Parameters

worksheet IWorksheet

The worksheet object.

Returns

System.Collections.Generic.IList<T><PageInfo>

Paginate(IEnumerable<IWorkbook>)

Generate pagination informations for all worksheets in all workbooks.

public IList<PageInfo> Paginate(IEnumerable<IWorkbook> workbooks)

Parameters

workbooks System.Collections.Generic.IEnumerable<T><IWorkbook>

The collection of workbooks.

Returns

System.Collections.Generic.IList<T><PageInfo>

SavePDF(Stream, params Workbook[])

Saves the datas from different workbooks to the specified pdf file stream.

public void SavePDF(Stream stream, params Workbook[] workbooks)

Parameters

stream System.IO.Stream

The specified pdf file.

workbooks Workbook[]

The workbook collection.

SavePDF(Stream, IEnumerable<Workbook>, PdfSaveOptions)

Saves the datas from different workbooks to the specified pdf file stream.

public void SavePDF(Stream stream, IEnumerable<Workbook> workbooks, PdfSaveOptions options = null)

Parameters

stream System.IO.Stream

The specified pdf file.

workbooks System.Collections.Generic.IEnumerable<T><Workbook>

The workbook collection.

options PdfSaveOptions

Options for saving pdf file.

SavePDF(Stream, IList<PageInfo>, PdfSaveOptions)

Saves the page datas to the specified pdf file stream.

public void SavePDF(Stream stream, IList<PageInfo> pages, PdfSaveOptions options = null)

Parameters

stream System.IO.Stream

The specified pdf file.

pages System.Collections.Generic.IList<T><PageInfo>

The page information collection.

options PdfSaveOptions

Options for saving pdf file.

SavePDF(string, params Workbook[])

Saves the datas from different workbooks to the specified pdf file.

public void SavePDF(string fileName, params Workbook[] workbooks)

Parameters

fileName string

The specified pdf file.

workbooks Workbook[]

The workbook collection.

SavePDF(string, IEnumerable<Workbook>, PdfSaveOptions)

Saves the datas from different workbooks to the specified pdf file.

public void SavePDF(string fileName, IEnumerable<Workbook> workbooks, PdfSaveOptions options = null)

Parameters

fileName string

The specified pdf file.

workbooks System.Collections.Generic.IEnumerable<T><Workbook>

The workbook collection.

options PdfSaveOptions

Options for saving pdf file.

SavePDF(string, IList<PageInfo>, PdfSaveOptions)

Saves the page datas to the specified pdf file.

public void SavePDF(string fileName, IList<PageInfo> pages, PdfSaveOptions options = null)

Parameters

fileName string

The specified pdf file.

pages System.Collections.Generic.IList<T><PageInfo>

The page information collection.

options PdfSaveOptions

Options for saving pdf file.

UpdatePageNumberAndPageSettings(IList<PageInfo>, int, int)

Update the page number, page count and page settings of each page. When the page collection changes (add, delete, move), you need to call this method to update the pages information.

public void UpdatePageNumberAndPageSettings(IList<PageInfo> pages, int firstPageNumber, int pageCount)

Parameters

pages System.Collections.Generic.IList<T><PageInfo>

The page collection.

firstPageNumber int

The page number of the first page.

pageCount int

The total number of pages.

UpdatePageNumberAndPageSettings(IList<PageInfo>)

Update the page number, page count and page settings of each page. When the page collection changes (add, delete, move), you need to call this method to update the pages information.

public void UpdatePageNumberAndPageSettings(IList<PageInfo> pages)

Parameters

pages System.Collections.Generic.IList<T><PageInfo>

The page collection.