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

ConstructorDescription
WorkbookRender(Workbook workbook, ImageOrPrintOptions options)The construct of WorkbookRender

Methods

MethodDescription
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:

ParameterTypeDescription
workbookWorkbookIndicate which workbook to be rendered.
optionsImageOrPrintOptionsImageOrPrintOptions 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:

ParameterTypeDescription
arg0java.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:

ParameterTypeDescription
pageIndexintThe 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:

ParameterTypeDescription
pageIndexintindicate which page is to be converted
streamjava.io.InputStreamthe stream of the output image

toImage(int pageIndex, OutputStream stream)

public void toImage(int pageIndex, OutputStream stream)

Render certain page to a stream.

Parameters:

ParameterTypeDescription
pageIndexintindicate which page is to be converted
streamjava.io.OutputStreamthe stream of the output image

toImage(int pageIndex, String fileName)

public void toImage(int pageIndex, String fileName)

Render certain page to a file.

Parameters:

ParameterTypeDescription
pageIndexintindicate which page is to be converted
fileNamejava.lang.Stringfilename of the output image

toImage(OutputStream stream)

public void toImage(OutputStream stream)

Render whole workbook as Tiff Image to stream.

Parameters:

ParameterTypeDescription
streamjava.io.OutputStreamthe stream of the output image

toImage(String filename)

public void toImage(String filename)

Render whole workbook as Tiff Image to a file.

Parameters:

ParameterTypeDescription
filenamejava.lang.Stringthe filename of the output image

toPrinter(String printerName)

public void toPrinter(String printerName)

Render workbook to Printer

Parameters:

ParameterTypeDescription
printerNamejava.lang.Stringthe 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:

ParameterTypeDescription
printerNamejava.lang.Stringthe name of the printer , for example: “Microsoft Office Document Image Writer”
printPageIndexintthe 0-based index of the first page to print, it must be in Range [0, WorkbookRender.PageCount-1]
printPageCountintthe 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:

ParameterTypeDescription
printerNamejava.lang.Stringthe name of the printer , for example: “Microsoft Office Document Image Writer”
jobNamejava.lang.Stringset 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:

ParameterTypeDescription
arg0long

wait(long arg0, int arg1)

public final void wait(long arg0, int arg1)

Parameters:

ParameterTypeDescription
arg0long
arg1int