public class SheetRender
Constructor Summary |
---|
SheetRender(Worksheet worksheet, ImageOrPrintOptions options)
the construct of SheetRender, need worksheet and ImageOrPrintOptions as params |
Property Getters/Setters Summary | ||
---|---|---|
int | getPageCount() | |
Indicate the total page count of current worksheet
|
||
double | getPageScale() | |
Gets calculated page scale of the sheet.
|
Method Summary | ||
---|---|---|
float[] | getPageSize(int pageIndex) | |
Get page size of output image. The size unit is in point.
|
||
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 | toPrinter(java.lang.String PrinterName) | |
Render worksheet to Printer
|
||
void | toPrinter(java.lang.String PrinterName, java.lang.String DocumentName) | |
Render worksheet to Printer
|
public SheetRender(Worksheet worksheet, ImageOrPrintOptions options) throws java.lang.Exception
worksheet
- Indicate which spreadsheet to be rendered.options
- ImageOrPrintOptions contains some property of output imagepublic int getPageCount()
public double getPageScale()
public float[] getPageSize(int pageIndex)
pageIndex
- The page index is based on zero.public void toImage(int pageIndex, java.lang.String fileName) throws java.lang.Exception
pageIndex
- indicate which page is to be convertedfileName
- filename of the output imagepublic void toImage(int pageIndex, java.io.OutputStream stream) throws java.lang.Exception
pageIndex
- indicate which page is to be convertedstream
- the stream of the output imagepublic void toPrinter(java.lang.String PrinterName) throws java.lang.Exception
PrinterName
- the name of the printer , for example: "Microsoft Office Document Image Writer"public void toPrinter(java.lang.String PrinterName, java.lang.String DocumentName) throws java.lang.Exception
PrinterName
- the name of the printer , for example: "Microsoft Office Document Image Writer"DocumentName
- set the print job name