Package com.grapecity.documents.excel
Class PrintManager
java.lang.Object
com.grapecity.documents.excel.PrintManager
Represents a print settings class.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal voidappendPage(org.apache.pdfbox.pdmodel.PDDocument doc, PageInfo pageInfo) Append the page info to the specified pdf document.final voidappendPage(org.apache.pdfbox.pdmodel.PDDocument doc, PageInfo pageInfo, PdfSaveOptions options) Append the page info to the specified pdf document.final voiddraw(org.apache.pdfbox.pdmodel.PDDocument doc, org.apache.pdfbox.pdmodel.PDPage page, Point location, IRange range) Draw the range data to the specific location in a specified pdf page.final voiddraw(org.apache.pdfbox.pdmodel.PDDocument doc, org.apache.pdfbox.pdmodel.PDPage page, Point location, IRange range, PdfSaveOptions options) Draw the range data to the specific location in a specified pdf page.final voiddraw(org.apache.pdfbox.pdmodel.PDDocument doc, org.apache.pdfbox.pdmodel.PDPage page, Rectangle rect, IRange range) Draw the range data to the specific location in a specified pdf page.final voiddraw(org.apache.pdfbox.pdmodel.PDDocument doc, org.apache.pdfbox.pdmodel.PDPage page, Rectangle rect, IRange range, PdfSaveOptions options) Draw the range data to the specific location in a specified pdf page.final voiddraw(org.apache.pdfbox.pdmodel.PDDocument doc, org.apache.pdfbox.pdmodel.PDPage page, Rectangle rect, PageContentInfo pageContent) Draw the page info to the specific location in a specified pdf page.final voiddraw(org.apache.pdfbox.pdmodel.PDDocument doc, org.apache.pdfbox.pdmodel.PDPage page, Rectangle rect, PageContentInfo pageContent, PdfSaveOptions options) Draw the page info to the specific location in a specified pdf page.final voiddraw(org.apache.pdfbox.pdmodel.PDDocument doc, org.apache.pdfbox.pdmodel.PDPage page, Rectangle rect, PageInfo pageInfo) Draw the page info to the specific location in a specified pdf page.final voiddraw(org.apache.pdfbox.pdmodel.PDDocument doc, org.apache.pdfbox.pdmodel.PDPage page, Rectangle rect, PageInfo pageInfo, PdfSaveOptions options) Draw the page info to the specific location in a specified pdf page.final voiddraw(org.apache.pdfbox.pdmodel.PDDocument doc, org.apache.pdfbox.pdmodel.PDPage page, List<PageInfo> pages, int rows, int columns, Order order) Draw the pages in the page collection on a page in a certain direction.final voiddraw(org.apache.pdfbox.pdmodel.PDDocument doc, org.apache.pdfbox.pdmodel.PDPage page, List<PageInfo> pages, int rows, int columns, Order order, PdfSaveOptions options) Draw the pages in the page collection on a page in a certain direction.protected voidfinalize()Finalizes the Theme object before it is garbage collected.final PageContentInfogeneratePageContentInfo(IRange printArea, Size availableSize, int rowStart, int columnStart, boolean rowHeaderVisible, boolean columnHeaderVisible) Returns a PageContentInfo object.GetPaginationInfo(IWorksheet worksheet, PaginationOrientation orientation) Returns an array of row or column indexes which represents the page boundaries for vertical or horizontal paging.GetPaginationInfo(IWorksheet worksheet, PaginationOrientation orientation, List<IRange> keepTogetherRanges, List<RepeatSetting> repeatSettings) Returns an array of row or column indexes which represents the page boundaries for vertical or horizontal paging.getPrintAreas(IWorksheet worksheet) Returns the size in points of the paper.final SizeReturns the size of the range.final SizegetSize(PageContentInfo contentInfo) Returns the size of the PageContentInfo.final booleanhasPrintContent(IRange range) Returns whether there has content to print.Generate pagination information for the range.Generate pagination informations for all worksheets in the workbook.paginate(IWorksheet worksheet) Generate pagination information for the worksheet.paginate(IWorksheet worksheet, List<IRange> keepTogetherRanges, List<RepeatSetting> repeatSettings) Generate pagination information for the worksheet.Generate pagination informations for all worksheets in all workbooks.final voidsavePageInfosToPDF(OutputStream stream, List<PageInfo> pages) Saves the page datas to the specified pdf file stream.final voidsavePageInfosToPDF(OutputStream stream, List<PageInfo> pages, PdfSaveOptions options) Saves the page datas to the specified pdf file stream.final voidsavePageInfosToPDF(String fileName, List<PageInfo> pages) Saves the page datas to the specified pdf file.final voidsavePageInfosToPDF(String fileName, List<PageInfo> pages, PdfSaveOptions options) Saves the page datas to the specified pdf file.final voidsaveWorkbooksToPDF(OutputStream stream, List<IWorkbook> workbooks) Saves the datas from different workbooks to the specified pdf file stream.final voidsaveWorkbooksToPDF(OutputStream stream, List<IWorkbook> workbooks, PdfSaveOptions options) Saves the datas from different workbooks to the specified pdf file stream.final voidsaveWorkbooksToPDF(String fileName, List<IWorkbook> workbooks) Saves the datas from different workbooks to the specified pdf file.final voidsaveWorkbooksToPDF(String fileName, List<IWorkbook> workbooks, PdfSaveOptions options) Saves the datas from different workbooks to the specified pdf file.final voidUpdate the page number, page count and page settings of each page.final voidupdatePageNumberAndPageSettings(List<PageInfo> pages, int firstPageNumber, int pageCount) Update the page number, page count and page settings of each page.
-
Constructor Details
-
PrintManager
public PrintManager()
-
-
Method Details
-
finalize
Finalizes the Theme object before it is garbage collected. -
saveWorkbooksToPDF
Saves the datas from different workbooks to the specified pdf file stream.- Parameters:
stream- The specified pdf file.workbooks- The workbook collection.
-
saveWorkbooksToPDF
public final void saveWorkbooksToPDF(OutputStream stream, List<IWorkbook> workbooks, PdfSaveOptions options) Saves the datas from different workbooks to the specified pdf file stream.- Parameters:
stream- The specified pdf file.workbooks- The workbook collection.options- Options for saving pdf file.
-
saveWorkbooksToPDF
Saves the datas from different workbooks to the specified pdf file.- Parameters:
fileName- The specified pdf file.workbooks- The workbook collection.
-
saveWorkbooksToPDF
public final void saveWorkbooksToPDF(String fileName, List<IWorkbook> workbooks, PdfSaveOptions options) Saves the datas from different workbooks to the specified pdf file.- Parameters:
fileName- The specified pdf file.workbooks- The workbook collection.options- Options for saving pdf file.
-
savePageInfosToPDF
Saves the page datas to the specified pdf file stream.- Parameters:
stream- The specified pdf file.pages- The page information collection.
-
savePageInfosToPDF
public final void savePageInfosToPDF(OutputStream stream, List<PageInfo> pages, PdfSaveOptions options) Saves the page datas to the specified pdf file stream.- Parameters:
stream- The specified pdf file.pages- The page information collection.options- Options for saving pdf file.
-
savePageInfosToPDF
Saves the page datas to the specified pdf file.- Parameters:
fileName- The specified pdf file.pages- The page information collection.
-
savePageInfosToPDF
Saves the page datas to the specified pdf file.- Parameters:
fileName- The specified pdf file.pages- The page information collection.options- Options for saving pdf file.
-
paginate
Generate pagination informations for all worksheets in all workbooks.- Parameters:
workbooks- The collection of workbooks.
-
paginate
Generate pagination informations for all worksheets in the workbook.- Parameters:
workbook- The workbook object.
-
paginate
Generate pagination information for the worksheet.- Parameters:
worksheet- The worksheet object.
-
paginate
public final List<PageInfo> paginate(IWorksheet worksheet, List<IRange> keepTogetherRanges, List<RepeatSetting> repeatSettings) Generate pagination information for the worksheet. Keep- Parameters:
worksheet- The worksheet object.keepTogetherRanges- The collection of ranges that need to keep together.repeatSettings- The collection of repeat settings for a Range.
-
generatePageContentInfo
public final PageContentInfo generatePageContentInfo(IRange printArea, Size availableSize, int rowStart, int columnStart, boolean rowHeaderVisible, boolean columnHeaderVisible) Returns a PageContentInfo object.- Parameters:
printArea- The print area.availableSize- The size that excludes the margins.rowStart- The start row index which is used to calculate the RowEnd.columnStart- The start column index which is used to calculate the ColumnEnd.rowHeaderVisible- True if the row header is printed with this page.columnHeaderVisible- True if the column header is printed with this page.
-
updatePageNumberAndPageSettings
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.- Parameters:
pages- The page collection.
-
updatePageNumberAndPageSettings
public final void updatePageNumberAndPageSettings(List<PageInfo> pages, int firstPageNumber, int pageCount) 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.- Parameters:
pages- The page collection.firstPageNumber- The page number of the first page.pageCount- The total number of pages.
-
appendPage
Append the page info to the specified pdf document.- Parameters:
doc- The specified PDF document.pageInfo- The printed page info.
-
appendPage
public final void appendPage(org.apache.pdfbox.pdmodel.PDDocument doc, PageInfo pageInfo, PdfSaveOptions options) Append the page info to the specified pdf document.- Parameters:
doc- The specified PDF document.pageInfo- The printed page info.options- Options for saving pdf file.
-
draw
public final void draw(org.apache.pdfbox.pdmodel.PDDocument doc, org.apache.pdfbox.pdmodel.PDPage page, List<PageInfo> pages, int rows, int columns, Order order) Draw the pages in the page collection on a page in a certain direction.- Parameters:
page- The page in a PDF document.pages- The page collection.rows- The number of rows that these pages will be divided into.columns- The number of columns that these pages will be divided into.order- The direction uses to arrange the pages.
-
draw
public final void draw(org.apache.pdfbox.pdmodel.PDDocument doc, org.apache.pdfbox.pdmodel.PDPage page, List<PageInfo> pages, int rows, int columns, Order order, PdfSaveOptions options) Draw the pages in the page collection on a page in a certain direction.- Parameters:
page- The page in a PDF document.pages- The page collection.rows- The number of rows that these pages will be divided into.columns- The number of columns that these pages will be divided into.order- The direction uses to arrange the pages.options- Options for saving pdf file.
-
hasPrintContent
Returns whether there has content to print.- Parameters:
range- The printed range of a page.
-
getSize
Returns the size of the PageContentInfo.- Parameters:
contentInfo- The PageContentInfo object.
-
getSize
Returns the size of the range.- Parameters:
range- The range object.
-
paginate
Generate pagination information for the range.- Parameters:
printArea- The area will be paginated.
-
draw
public final void draw(org.apache.pdfbox.pdmodel.PDDocument doc, org.apache.pdfbox.pdmodel.PDPage page, Point location, IRange range) Draw the range data to the specific location in a specified pdf page.- Parameters:
page- The page in a PDF document.location- The location of the range data to be drawn.range- The print data range.
-
draw
public final void draw(org.apache.pdfbox.pdmodel.PDDocument doc, org.apache.pdfbox.pdmodel.PDPage page, Point location, IRange range, PdfSaveOptions options) Draw the range data to the specific location in a specified pdf page.- Parameters:
page- The page in a PDF document.location- The location of the range data to be drawn.range- The print data range.options- Options for saving pdf file.
-
draw
public final void draw(org.apache.pdfbox.pdmodel.PDDocument doc, org.apache.pdfbox.pdmodel.PDPage page, Rectangle rect, IRange range) Draw the range data to the specific location in a specified pdf page.- Parameters:
page- The page in a PDF document.rect- The location and size of the range data to be drawn.range- The print data range.
-
draw
public final void draw(org.apache.pdfbox.pdmodel.PDDocument doc, org.apache.pdfbox.pdmodel.PDPage page, Rectangle rect, IRange range, PdfSaveOptions options) Draw the range data to the specific location in a specified pdf page.- Parameters:
page- The page in a PDF document.rect- The location and size of the range data to be drawn.range- The print data range.options- Options for saving pdf file.
-
draw
public final void draw(org.apache.pdfbox.pdmodel.PDDocument doc, org.apache.pdfbox.pdmodel.PDPage page, Rectangle rect, PageContentInfo pageContent) Draw the page info to the specific location in a specified pdf page.- Parameters:
page- The page in a PDF document.rect- The location and size of the data to be drawn.pageContent- The printed page content info.
-
draw
public final void draw(org.apache.pdfbox.pdmodel.PDDocument doc, org.apache.pdfbox.pdmodel.PDPage page, Rectangle rect, PageContentInfo pageContent, PdfSaveOptions options) Draw the page info to the specific location in a specified pdf page.- Parameters:
page- The page in a PDF document.rect- The location and size of the data to be drawn.pageContent- The printed page content info.options- Options for saving pdf file.
-
draw
public final void draw(org.apache.pdfbox.pdmodel.PDDocument doc, org.apache.pdfbox.pdmodel.PDPage page, Rectangle rect, PageInfo pageInfo) Draw the page info to the specific location in a specified pdf page.- Parameters:
page- The page in a PDF document.rect- The location and size of the data to be drawn.pageInfo- The printed page info.
-
draw
public final void draw(org.apache.pdfbox.pdmodel.PDDocument doc, org.apache.pdfbox.pdmodel.PDPage page, Rectangle rect, PageInfo pageInfo, PdfSaveOptions options) Draw the page info to the specific location in a specified pdf page.- Parameters:
page- The page in a PDF document.rect- The location and size of the data to be drawn.pageInfo- The printed page info.options- Options for saving pdf file.
-
getPrintAreas
Returns the size in points of the paper.- Parameters:
worksheet- The worksheet object.
-
GetPaginationInfo
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.- Parameters:
worksheet- The worksheet object.orientation- The orientation of pagination.
-
GetPaginationInfo
public List<Integer> GetPaginationInfo(IWorksheet worksheet, PaginationOrientation orientation, List<IRange> keepTogetherRanges, List<RepeatSetting> repeatSettings) 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.- Parameters:
worksheet- The worksheet object.orientation- The orientation of pagination.keepTogetherRanges- The collection of ranges that need to keep together.repeatSettings- The collection of repeat settings for a Range.
-