Constructor Summary |
---|
WorkbookRender(workbook, options)
The construct of WorkbookRender |
Property Getters/Setters Summary | ||
---|---|---|
function | getPageCount() | |
Indicate the total page count of workbook
|
Method Summary | ||
---|---|---|
function | toImage(pageIndex, stream) | |
Render certain page to a stream.
|
||
function | toImage(pageIndex, fileName) | |
Render certain page to a file.
|
||
function | toImage(filename) | |
Render whole workbook as Tiff Image to a file.
|
||
static function | toImageStream(workbookRender, stream) | |
Render whole workbook as Tiff Image to stream.
|
||
function | toPrinter(PrinterName) | |
Render workbook to Printer
|
||
function | toPrinter(PrinterName, DocumentName) | |
Render workbook to Printer
|
function WorkbookRender(workbook, options)
workbook: Workbook
- Indicate which workbook to be rendered.options: ImageOrPrintOptions
- ImageOrPrintOptions contains some property of output imagefunction getPageCount()
function toImage(filename)
filename: String
- the filename of the output imagefunction toImage(pageIndex, fileName)
pageIndex: Number
- indicate which page is to be convertedfileName: String
- filename of the output imagefunction toImage(pageIndex, stream)
pageIndex: Number
- indicate which page is to be convertedstream: OutputStream
- the stream of the output imagefunction toPrinter(PrinterName)
PrinterName: String
- the name of the printer , for example: "Microsoft Office Document Image Writer"function toPrinter(PrinterName, DocumentName)
PrinterName: String
- the name of the printer , for example: "Microsoft Office Document Image Writer"DocumentName: String
- set the print job name static function toImageStream(workbookRender, stream)
workbookRender: WorkbookRender
- The WorkbookRender objectstream: WritableStream
- The stream of the output imageExample:
var aspose = aspose || {}; aspose.cells = require("aspose.cells"); var fs = require("fs"); var workbook = new aspose.cells.Workbook("Book2.xlsx"); var imgOptions = new aspose.cells.ImageOrPrintOptions(); imgOptions.setHorizontalResolution(200); imgOptions.setVerticalResolution(300); imgOptions.setSaveFormat(aspose.cells.SaveFormat.XPS); var workbookRender = new aspose.cells.WorkbookRender(workbook, imgOptions); var imgWriteStream = fs.createWriteStream("workbook.xps"); aspose.cells.WorkbookRender.toImageStream(workbookRender, imgWriteStream);