[]
        
(Showing Draft Content)

PrintManager

Class PrintManager

java.lang.Object
com.grapecity.documents.excel.PrintManager

public class PrintManager extends Object
Represents a print settings class.
  • Constructor Details

    • PrintManager

      public PrintManager()
  • Method Details

    • finalize

      protected void finalize() throws Throwable
      Finalizes the Theme object before it is garbage collected.
      Overrides:
      finalize in class Object
      Throws:
      Throwable - An exception that occurs during finalization.
    • saveWorkbooksToPDF

      public final void saveWorkbooksToPDF(OutputStream stream, List<IWorkbook> workbooks)
      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

      public final void saveWorkbooksToPDF(String fileName, List<IWorkbook> workbooks)
      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

      public final void savePageInfosToPDF(OutputStream stream, List<PageInfo> pages)
      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

      public final void savePageInfosToPDF(String fileName, List<PageInfo> pages)
      Saves the page datas to the specified pdf file.
      Parameters:
      fileName - The specified pdf file.
      pages - The page information collection.
    • savePageInfosToPDF

      public final void savePageInfosToPDF(String fileName, List<PageInfo> pages, PdfSaveOptions options)
      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

      public final List<PageInfo> paginate(List<IWorkbook> workbooks)
      Generate pagination informations for all worksheets in all workbooks.
      Parameters:
      workbooks - The collection of workbooks.
    • paginate

      public final List<PageInfo> paginate(IWorkbook workbook)
      Generate pagination informations for all worksheets in the workbook.
      Parameters:
      workbook - The workbook object.
    • paginate

      public final List<PageInfo> paginate(IWorksheet worksheet)
      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

      public final void updatePageNumberAndPageSettings(List<PageInfo> 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.
      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

      public final void appendPage(org.apache.pdfbox.pdmodel.PDDocument doc, PageInfo pageInfo)
      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

      public final boolean hasPrintContent(IRange range)
      Returns whether there has content to print.
      Parameters:
      range - The printed range of a page.
    • getSize

      public final Size getSize(PageContentInfo contentInfo)
      Returns the size of the PageContentInfo.
      Parameters:
      contentInfo - The PageContentInfo object.
    • getSize

      public final Size getSize(IRange range)
      Returns the size of the range.
      Parameters:
      range - The range object.
    • paginate

      public final List<PageInfo> paginate(IRange printArea)
      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

      public final List<IRange> getPrintAreas(IWorksheet worksheet)
      Returns the size in points of the paper.
      Parameters:
      worksheet - The worksheet object.
    • GetPaginationInfo

      public List<Integer> GetPaginationInfo(IWorksheet worksheet, PaginationOrientation orientation)
      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.