public class WorkbookRender
extends java.lang.Object
Remarks
| Constructor and Description |
|---|
WorkbookRender(Workbook workbook,
ImageOrPrintOptions options)
The construct of WorkbookRender
|
| Modifier and Type | Method and Description |
|---|---|
void |
dispose()
Releases resources created and used for rendering.
|
int |
getPageCount()
Gets the total page count of workbook.
|
float[] |
getPageSizeInch(int pageIndex)
Get page size in inch of output image.
|
void |
toImage(int pageIndex,
java.io.InputStream stream)
Render certain page to a stream.
|
void |
toImage(int pageIndex,
java.io.OutputStream stream)
Render certain page to a stream.
|
void |
toImage(int pageIndex,
java.lang.String fileName)
Render certain page to a file.
|
void |
toImage(java.io.OutputStream stream)
Render whole workbook as Tiff Image to stream.
|
void |
toImage(java.lang.String filename)
Render whole workbook as Tiff Image to a file.
|
void |
toPrinter(java.lang.String printerName)
Render workbook to Printer
|
void |
toPrinter(java.lang.String printerName,
int printPageIndex,
int printPageCount)
Deprecated.
Use ToPrinter(string PrinterName) and ImageOrPrintOptions.PageIndex, PageCount instead.
|
void |
toPrinter(java.lang.String printerName,
java.lang.String jobName)
Render workbook to Printer
|
public WorkbookRender(Workbook workbook, ImageOrPrintOptions options)
workbook - Indicate which workbook to be rendered.options - ImageOrPrintOptions contains some property of output imagepublic int getPageCount()
public float[] getPageSizeInch(int pageIndex)
pageIndex - The page index is based on zero.public void toImage(java.io.OutputStream stream)
stream - the stream of the output imagepublic void toImage(java.lang.String filename)
filename - the filename of the output imagepublic void toImage(int pageIndex,
java.lang.String fileName)
pageIndex - indicate which page is to be convertedfileName - filename of the output imagepublic void toImage(int pageIndex,
java.io.InputStream stream)
pageIndex - indicate which page is to be convertedstream - the stream of the output imagepublic void toImage(int pageIndex,
java.io.OutputStream stream)
pageIndex - indicate which page is to be convertedstream - the stream of the output imagepublic void toPrinter(java.lang.String printerName)
printerName - the name of the printer , for example: "Microsoft Office Document Image Writer"public void toPrinter(java.lang.String printerName,
java.lang.String jobName)
printerName - the name of the printer , for example: "Microsoft Office Document Image Writer"jobName - set the print job namepublic void toPrinter(java.lang.String printerName,
int printPageIndex,
int printPageCount)
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.printerName - the name of the printer , for example: "Microsoft Office Document Image Writer"printPageIndex - the 0-based index of the first page to print, it must be in Range [0, WorkbookRender.PageCount-1]printPageCount - the number of pages to print, it must be greater than zeropublic void dispose()
See Also:
Aspose.Cells Documentation - the home page for the Aspose.Cells Product Documentation.
Aspose.Cells Support Forum - our preferred method of support.
We guarantee a prompt response to any inquiry!
© Aspose Pty Ltd 2003-2025. All Rights Reserved.