Home  Products  Purchase  Downloads  Demos  Forums  Blogs  Ticket  Wiki  API  Corporate


com.aspose.cells
Class SheetRender

java.lang.Object
  extended by com.aspose.cells.SheetRender

public class SheetRender
extends java.lang.Object

Represents a worksheet render which can render worksheet to various images such as (BMP, PNG, JPEG,EMF...)


Constructor Summary
SheetRender(Worksheet worksheet, ImageOptions options)
          The construct of SheetRender
 
Method Summary
 int getPageCount()
          Get the total page count of current worksheet
 java.awt.image.BufferedImage toImage(int pageIndex)
          Render certain page to a BufferedImage object.
 boolean toImage(int pageIndex, java.io.OutputStream outputStream)
          Render certain page to a outputStream
 boolean toImage(int pageIndex, java.lang.String fileName)
          Render certain page to a file
 void toPrinter(java.lang.String printerName)
          Render worksheet to Printer
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SheetRender

public SheetRender(Worksheet worksheet,
                   ImageOptions options)
The construct of SheetRender

Parameters:
worksheet - which spreadsheet to be rendered
options - properties of output image
See Also:
ImageOptions
Method Detail

getPageCount

public int getPageCount()
Get the total page count of current worksheet

Returns:
total page count of current worksheet

toImage

public boolean toImage(int pageIndex,
                       java.lang.String fileName)
                throws CellsException
Render certain page to a file

Parameters:
pageIndex - indicate which page is to be rendered
fileName - filename of the output image
Returns:
if success, return true, otherwise false
Throws:
CellsException

toImage

public boolean toImage(int pageIndex,
                       java.io.OutputStream outputStream)
                throws CellsException
Render certain page to a outputStream

Parameters:
pageIndex - indicate which page is to be rendered
outputStream - the stream of the output image
Returns:
if success, return true, otherwise false
Throws:
CellsException

toImage

public java.awt.image.BufferedImage toImage(int pageIndex)
                                     throws CellsException
Render certain page to a BufferedImage object.

Parameters:
pageIndex - indicate which page is to be rendered
Returns:
the BufferedImage object of the page
Throws:
CellsException

toPrinter

public void toPrinter(java.lang.String printerName)
               throws CellsException
Render worksheet to Printer

Parameters:
printerName - the name of the printer, for example: "Microsoft Office Document Image Writer"
Throws:
CellsException