aspose.cells

Class WorkbookRender

Represents a Workbook render. The constructor of this class , must be used after modification of pagesetup, cell style.

Constructor Summary
WorkbookRender(workbook, options)
The construct of WorkbookRender
 
Property Getters/Setters Summary
functiongetPageCount()
Gets the total page count of workbook.
 
Method Summary
functiongetPageSizeInch(pageIndex)
Get page size in inch of output image.
functiontoImage(pageIndex, stream)
Render certain page to a stream.
functiontoImage(pageIndex, fileName)
Render certain page to a file.
functiontoImage(filename)
Render whole workbook as Tiff Image to a file.
functiontoPrinter(printerName)
Render workbook to Printer
functiontoPrinter(printerName, jobName)
Render workbook to Printer
 

    • Constructor Detail

      • WorkbookRender

        function WorkbookRender(workbook, options)
        The construct of WorkbookRender
        Parameters:
        workbook: Workbook - Indicate which workbook to be rendered.
        options: ImageOrPrintOptions - ImageOrPrintOptions contains some property of output image
    • Property Getters/Setters Detail

      • getPageCount : Number 

        function getPageCount()
        
        Gets the total page count of workbook.
    • Method Detail

      • getPageSizeInch

        function getPageSizeInch(pageIndex)
        Get page size in inch of output image.
        Parameters:
        pageIndex: Number - The page index is based on zero.
        Returns:
        Page size of image, [0] for width and [1] for height
      • toImage

        function toImage(filename)
        Render whole workbook as Tiff Image to a file.
        Parameters:
        filename: String - the filename of the output image
      • toImage

        function toImage(pageIndex, fileName)
        Render certain page to a file.
        Parameters:
        pageIndex: Number - indicate which page is to be converted
        fileName: String - filename of the output image
      • toImage

        function toImage(pageIndex, stream)
        Render certain page to a stream.
        Parameters:
        pageIndex: Number - indicate which page is to be converted
        stream: OutputStream - the stream of the output image
      • toPrinter

        function toPrinter(printerName)
        Render workbook to Printer
        Parameters:
        printerName: String - the name of the printer , for example: "Microsoft Office Document Image Writer"
      • toPrinter

        function toPrinter(printerName, jobName)
        Render workbook to Printer
        Parameters:
        printerName: String - the name of the printer , for example: "Microsoft Office Document Image Writer"
        jobName: String - set the print job name