[]
Represents a print manager for pagination and PDF print output.
Use this class to generate PageInfo objects for a workbook or worksheet, adjust pagination results, and save the resulting pages to PDF. It is the entry point for custom pagination workflows such as controlling page breaks, keeping content together, and combining content from one or more workbooks into a single PDF output.
public class PrintManager
Public Class PrintManager
worksheet.Range["A1:B4"].Value = new object[,]
{
{ "Name", "Value" },
{ "A", 100 },
{ "B", 200 },
{ "C", 300 }
};
PrintManager printManager = new PrintManager();
IList<PageInfo> pages = printManager.Paginate(worksheet);
using MemoryStream stream = new MemoryStream();
printManager.SavePDF(stream, pages);
| Name | Description |
|---|---|
| PrintManager() |
| Name | Description |
|---|---|
| AppendPage(GcPdfDocument, PageInfo, PdfSaveOptions) | Appends the specified printed page to a PDF document.
This method creates a new PDF page in
The |
| Draw(Page, IList<PageInfo>, int, int, Order, PdfSaveOptions) | Draws the pages in a page collection onto a PDF page.
This method divides the target PDF page into a grid defined by |
| Draw(Page, PointF, IRange, PdfSaveOptions) | Draw the range data to the specific location in a specified pdf page. |
| Draw(Page, RectangleF, IRange, PdfSaveOptions) | Draw the range data to the specific location in a specified pdf page. |
| Draw(Page, RectangleF, PageContentInfo, PdfSaveOptions) | Draw the page info to the specific location in a specified pdf page. |
| Draw(Page, RectangleF, PageInfo, PdfSaveOptions) | Draw the page info to the specific location in a specified pdf page. |
| 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. |
| GetPaginationInfo(IWorksheet, PaginationOrientation) | Gets the row or column indexes that define page boundaries for the specified worksheet.
The pagination result is calculated from the current page setup of the worksheet and the
specified If the worksheet has no print area, this method returns |
| GetPaginationInfo(IWorksheet, PaginationOrientation, IList<IRange>, IList<RepeatSetting>) | Gets the row or column indexes that define page boundaries for the specified worksheet.
The pagination result is calculated from the current page setup of the worksheet and the
specified If the worksheet has no print area, this method returns |
| GetPrintAreas(IWorksheet) | Returns the ranges of the worksheet to be printed. |
| GetShrinkToFitFontSize(IRange, PdfSaveOptions) | Gets the best shrink-to-fit font size of the upper-left cell. |
| GetSize(IRange) | Returns the print size of the range. |
| GetSize(PageContentInfo) | Returns the size of the PageContentInfo. |
| HasPrintContent(IRange) | Returns whether the specified range contains content to print. |
| Paginate(IRange) | Generate pagination information for the range. |
| Paginate(IWorkbook) | Generate pagination informations for all worksheets in the workbook. |
| Paginate(IWorksheet) | Generate pagination information for the worksheet. |
| Paginate(IWorksheet, IList<IRange>, IList<RepeatSetting>) | Generate pagination information for the worksheet. |
| Paginate(IEnumerable<IWorkbook>) | Generates pagination information for all worksheets in all workbooks. This method paginates each workbook in the specified list by calling Paginate(IWorkbook), combines the resulting PageInfo objects into a single list, and then updates the page number and page settings for the combined pages. |
| SavePDF(Stream, params Workbook[]) | Paginates each workbook and saves all generated pages to the specified PDF file stream. |
| SavePDF(Stream, IEnumerable<Workbook>, PdfSaveOptions) | Paginates each workbook and saves all generated pages to the specified PDF file stream. |
| SavePDF(Stream, IList<PageInfo>, PdfSaveOptions) | Saves the page datas to the specified pdf file stream. |
| SavePDF(string, params Workbook[]) | Paginates each workbook and saves all generated pages to the specified PDF file. |
| SavePDF(string, IEnumerable<Workbook>, PdfSaveOptions) | Paginates each workbook and saves all generated pages to the specified PDF file. |
| SavePDF(string, IList<PageInfo>, PdfSaveOptions) | Saves the page datas to the specified pdf file. |
| UpdatePageNumberAndPageSettings(IList<PageInfo>) | Updates the page number, page count, and page settings of each page. Call this method after the page collection changes, such as when pages are added, deleted, or moved. It refreshes the supplied PageInfo list so pagination metadata stays consistent before further processing or export. |
| 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. |