[]
Represents a print settings class.
public class PrintManager
public PrintManager()
Append the page info to the specified pdf document.
public void AppendPage(GcPdfDocument doc, PageInfo pageInfo, PdfSaveOptions options = null)
doc
GrapeCity.Documents.Pdf.GcPdfDocumentThe specified GcPdfDocument.
pageInfo
PageInfoThe printed page info.
options
PdfSaveOptionsOptions for saving pdf file.
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)
page
GrapeCity.Documents.Pdf.PageThe page in a GcPdfDocument.
pages
System.Collections.Generic.IList<T><PageInfo>The page collection.
rows
intThe number of rows that these pages will be divided into.
columns
intThe number of columns that these pages will be divided into.
order
OrderThe direction used to arrange the pages.
options
PdfSaveOptionsOptions for saving pdf file.
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)
page
GrapeCity.Documents.Pdf.PageThe page in a GcPdfDocument.
location
System.Drawing.PointFThe location of the range data to be drawn.
range
IRangeThe print data range.
options
PdfSaveOptionsOptions for saving pdf file.
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)
page
GrapeCity.Documents.Pdf.PageThe page in a GcPdfDocument.
rect
System.Drawing.RectangleFThe location and size of the range data to be drawn.
range
IRangeThe print data range.
options
PdfSaveOptionsOptions for saving pdf file.
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)
page
GrapeCity.Documents.Pdf.PageThe page in a GcPdfDocument.
rect
System.Drawing.RectangleFThe location and size of the data to be drawn.
pageContent
PageContentInfoThe printed page content info.
options
PdfSaveOptionsOptions for saving pdf file.
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)
page
GrapeCity.Documents.Pdf.PageThe page in a GcPdfDocument.
rect
System.Drawing.RectangleFThe location and size of the data to be drawn.
pageInfo
PageInfoThe printed page info.
options
PdfSaveOptionsOptions for saving pdf file.
Returns a PageContentInfo object.
public PageContentInfo GeneratePageContentInfo(IRange printArea, SizeF availableSize, int rowStart, int columnStart, bool rowHeaderVisible, bool columnHeaderVisible)
printArea
IRangeThe print area.
availableSize
System.Drawing.SizeFThe size that excludes the margins.
rowStart
intThe start row index which is used to calculate the RowEnd.
columnStart
intThe start column index which is used to calculate the ColumnEnd.
rowHeaderVisible
boolTrue if the row header is printed with this page.
columnHeaderVisible
boolTrue if the column header is printed with this page.
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)
worksheet
IWorksheetThe worksheet object.
orientation
PaginationOrientationThe 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 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)
worksheet
IWorksheetThe worksheet object.
orientation
PaginationOrientationThe orientation of pagination.
Returns the ranges of the worksheet to be printed.
public IList<IRange> GetPrintAreas(IWorksheet worksheet)
worksheet
IWorksheetThe worksheet object.
Gets the best shrink-to-fit font size of the upper-left cell.
public double GetShrinkToFitFontSize(IRange range, PdfSaveOptions options)
range
IRangeThe range to be printed.
options
PdfSaveOptionsOptions for saving pdf file.
The font size to apply for shrinking text to fit within the range.
Returns the print size of the range.
public SizeF GetSize(IRange range)
range
IRangeThe range object.
Returns the size of the PageContentInfo.
public SizeF GetSize(PageContentInfo contentInfo)
contentInfo
PageContentInfoThe PageContentInfo object.
Returns whether there has content to print.
public bool HasPrintContent(IRange range)
range
IRangeThe printed range of a page.
Generate pagination information for the range.
public IList<PageInfo> Paginate(IRange printArea)
printArea
IRangeThe area will be paginated.
Generate pagination informations for all worksheets in the workbook.
public IList<PageInfo> Paginate(IWorkbook workbook)
workbook
IWorkbookThe workbook object.
Generate pagination information for the worksheet.
public IList<PageInfo> Paginate(IWorksheet worksheet, IList<IRange> keepTogetherRanges, IList<RepeatSetting> repeatSettings)
worksheet
IWorksheetThe 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.
Generate pagination information for the worksheet.
public IList<PageInfo> Paginate(IWorksheet worksheet)
worksheet
IWorksheetThe worksheet object.
Generate pagination informations for all worksheets in all workbooks.
public IList<PageInfo> Paginate(IEnumerable<IWorkbook> workbooks)
workbooks
System.Collections.Generic.IEnumerable<T><IWorkbook>The collection of workbooks.
Saves the datas from different workbooks to the specified pdf file stream.
public void SavePDF(Stream stream, params Workbook[] workbooks)
stream
System.IO.StreamThe specified pdf file.
workbooks
Workbook[]The workbook collection.
Saves the datas from different workbooks to the specified pdf file stream.
public void SavePDF(Stream stream, IEnumerable<Workbook> workbooks, PdfSaveOptions options = null)
stream
System.IO.StreamThe specified pdf file.
workbooks
System.Collections.Generic.IEnumerable<T><Workbook>The workbook collection.
options
PdfSaveOptionsOptions for saving pdf file.
Saves the page datas to the specified pdf file stream.
public void SavePDF(Stream stream, IList<PageInfo> pages, PdfSaveOptions options = null)
stream
System.IO.StreamThe specified pdf file.
pages
System.Collections.Generic.IList<T><PageInfo>The page information collection.
options
PdfSaveOptionsOptions for saving pdf file.
Saves the datas from different workbooks to the specified pdf file.
public void SavePDF(string fileName, params Workbook[] workbooks)
fileName
stringThe specified pdf file.
workbooks
Workbook[]The workbook collection.
Saves the datas from different workbooks to the specified pdf file.
public void SavePDF(string fileName, IEnumerable<Workbook> workbooks, PdfSaveOptions options = null)
fileName
stringThe specified pdf file.
workbooks
System.Collections.Generic.IEnumerable<T><Workbook>The workbook collection.
options
PdfSaveOptionsOptions for saving pdf file.
Saves the page datas to the specified pdf file.
public void SavePDF(string fileName, IList<PageInfo> pages, PdfSaveOptions options = null)
fileName
stringThe specified pdf file.
pages
System.Collections.Generic.IList<T><PageInfo>The page information collection.
options
PdfSaveOptionsOptions for saving pdf file.
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)
pages
System.Collections.Generic.IList<T><PageInfo>The page collection.
firstPageNumber
intThe page number of the first page.
pageCount
intThe total number of pages.
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)
pages
System.Collections.Generic.IList<T><PageInfo>The page collection.