WorkbookRender
Contents
[
Hide
]WorkbookRender class
Represents a Workbook render. The constructor of this class , must be used after modification of pagesetup, cell style.
class WorkbookRender;
Constructors
Name | Description |
---|---|
constructor(Workbook, ImageOrPrintOptions) | The construct of WorkbookRender |
Methods
Method | Description |
---|---|
getPageCount() | Gets the total page count of workbook. |
getPageSizeInch(number) | Get page size in inch of output image. |
toImage() | Render whole workbook as Tiff Image to stream. |
toImage(string) | Render whole workbook as Tiff Image to a file. |
toImage(number, string) | Render certain page to a file. |
toImage(number) | Render certain page to a stream. |
dispose() | Releases resources created and used for rendering. |
isNull() | Checks whether the implementation object is null. |
constructor(Workbook, ImageOrPrintOptions)
The construct of WorkbookRender
constructor(workbook: Workbook, options: ImageOrPrintOptions);
Parameters:
Parameter | Type | Description |
---|---|---|
workbook | Workbook | Indicate which workbook to be rendered. |
options | ImageOrPrintOptions | ImageOrPrintOptions contains some property of output image |
getPageCount()
Gets the total page count of workbook.
getPageCount() : number;
getPageSizeInch(number)
Get page size in inch of output image.
getPageSizeInch(pageIndex: number) : number[];
Parameters:
Parameter | Type | Description |
---|---|---|
pageIndex | number | The page index is based on zero. |
Returns
Page size of image, [0] for width and [1] for height
toImage()
Render whole workbook as Tiff Image to stream.
toImage() : Uint8Array;
Returns
The result stream
toImage(string)
Render whole workbook as Tiff Image to a file.
toImage(filename: string) : void;
Parameters:
Parameter | Type | Description |
---|---|---|
filename | string | the filename of the output image |
toImage(number, string)
Render certain page to a file.
toImage(pageIndex: number, fileName: string) : void;
Parameters:
Parameter | Type | Description |
---|---|---|
pageIndex | number | indicate which page is to be converted |
fileName | string | filename of the output image |
toImage(number)
Render certain page to a stream.
toImage(pageIndex: number) : Uint8Array;
Parameters:
Parameter | Type | Description |
---|---|---|
pageIndex | number | indicate which page is to be converted |
Returns
The result stream
dispose()
Releases resources created and used for rendering.
dispose() : void;
isNull()
Checks whether the implementation object is null.
isNull() : boolean;