WorkbookRender
Inheritance: java.lang.Object
public class WorkbookRender
Represents a Workbook render. The constructor of this class , must be used after modification of pagesetup, cell style.
Remarks
Constructors
Constructor | Description |
---|---|
WorkbookRender(Workbook workbook, ImageOrPrintOptions options) | The construct of WorkbookRender |
Methods
Method | Description |
---|---|
dispose() | Releases resources created and used for rendering. |
equals(Object arg0) | |
getClass() | |
getPageCount() | Gets the total page count of workbook. |
getPageSizeInch(int pageIndex) | Get page size in inch of output image. |
hashCode() | |
notify() | |
notifyAll() | |
toImage(int pageIndex, InputStream stream) | Render certain page to a stream. |
toImage(int pageIndex, OutputStream stream) | Render certain page to a stream. |
toImage(int pageIndex, String fileName) | Render certain page to a file. |
toImage(OutputStream stream) | Render whole workbook as Tiff Image to stream. |
toImage(String filename) | Render whole workbook as Tiff Image to a file. |
toPrinter(String printerName) | Render workbook to Printer |
toPrinter(String printerName, int printPageIndex, int printPageCount) | Render workbook to Printer |
toPrinter(String printerName, String jobName) | Render workbook to Printer |
toString() | |
wait() | |
wait(long arg0) | |
wait(long arg0, int arg1) |
WorkbookRender(Workbook workbook, ImageOrPrintOptions options)
public WorkbookRender(Workbook workbook, ImageOrPrintOptions options)
The construct of WorkbookRender
Parameters:
Parameter | Type | Description |
---|---|---|
workbook | Workbook | Indicate which workbook to be rendered. |
options | ImageOrPrintOptions | ImageOrPrintOptions contains some property of output image |
dispose()
public void dispose()
Releases resources created and used for rendering.
equals(Object arg0)
public boolean equals(Object arg0)
Parameters:
Parameter | Type | Description |
---|---|---|
arg0 | java.lang.Object |
Returns: boolean
getClass()
public final native Class<?> getClass()
Returns: java.lang.Class
getPageCount()
public int getPageCount()
Gets the total page count of workbook.
Returns: int
getPageSizeInch(int pageIndex)
public float[] getPageSizeInch(int pageIndex)
Get page size in inch of output image.
Parameters:
Parameter | Type | Description |
---|---|---|
pageIndex | int | The page index is based on zero. |
Returns: float[] - Page size of image, [0] for width and [1] for height
hashCode()
public native int hashCode()
Returns: int
notify()
public final native void notify()
notifyAll()
public final native void notifyAll()
toImage(int pageIndex, InputStream stream)
public void toImage(int pageIndex, InputStream stream)
Render certain page to a stream.
Parameters:
Parameter | Type | Description |
---|---|---|
pageIndex | int | indicate which page is to be converted |
stream | java.io.InputStream | the stream of the output image |
toImage(int pageIndex, OutputStream stream)
public void toImage(int pageIndex, OutputStream stream)
Render certain page to a stream.
Parameters:
Parameter | Type | Description |
---|---|---|
pageIndex | int | indicate which page is to be converted |
stream | java.io.OutputStream | the stream of the output image |
toImage(int pageIndex, String fileName)
public void toImage(int pageIndex, String fileName)
Render certain page to a file.
Parameters:
Parameter | Type | Description |
---|---|---|
pageIndex | int | indicate which page is to be converted |
fileName | java.lang.String | filename of the output image |
toImage(OutputStream stream)
public void toImage(OutputStream stream)
Render whole workbook as Tiff Image to stream.
Parameters:
Parameter | Type | Description |
---|---|---|
stream | java.io.OutputStream | the stream of the output image |
toImage(String filename)
public void toImage(String filename)
Render whole workbook as Tiff Image to a file.
Parameters:
Parameter | Type | Description |
---|---|---|
filename | java.lang.String | the filename of the output image |
toPrinter(String printerName)
public void toPrinter(String printerName)
Render workbook to Printer
Parameters:
Parameter | Type | Description |
---|---|---|
printerName | java.lang.String | the name of the printer , for example: “Microsoft Office Document Image Writer” |
toPrinter(String printerName, int printPageIndex, int printPageCount)
public void toPrinter(String printerName, int printPageIndex, int printPageCount)
Render workbook to Printer
Remarks
NOTE: This method is now obsolete. Instead, please use ToPrinter(string PrinterName) and ImageOrPrintOptions.PageIndex, PageCount to set the first page and the number of pages to print. This property will be removed 12 months later since December 2021. Aspose apologizes for any inconvenience you may have experienced.
Parameters:
Parameter | Type | Description |
---|---|---|
printerName | java.lang.String | the name of the printer , for example: “Microsoft Office Document Image Writer” |
printPageIndex | int | the 0-based index of the first page to print, it must be in Range [0, WorkbookRender.PageCount-1] |
printPageCount | int | the number of pages to print, it must be greater than zero |
toPrinter(String printerName, String jobName)
public void toPrinter(String printerName, String jobName)
Render workbook to Printer
Parameters:
Parameter | Type | Description |
---|---|---|
printerName | java.lang.String | the name of the printer , for example: “Microsoft Office Document Image Writer” |
jobName | java.lang.String | set the print job name |
toString()
public String toString()
Returns: java.lang.String
wait()
public final void wait()
wait(long arg0)
public final native void wait(long arg0)
Parameters:
Parameter | Type | Description |
---|---|---|
arg0 | long |
wait(long arg0, int arg1)
public final void wait(long arg0, int arg1)
Parameters:
Parameter | Type | Description |
---|---|---|
arg0 | long | |
arg1 | int |