com.aspose.cells
Class ImageOrPrintOptions

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

public class ImageOrPrintOptions 
extends java.lang.Object

Allows to specify options when rendering worksheet to images, printing worksheet or rendering chart to image.

Example:

//Set Image Or Print Options
ImageOrPrintOptions options = new ImageOrPrintOptions();

//set Horizontal resolution
options.setHorizontalResolution(200);

//set Vertica; Resolution
options.setVerticalResolution(300);

//Instantiate Workbook
Workbook book = new Workbook("c:\\test.xls");

//Save chart as Image using ImageOrPrint Options
Bitmap chartObject = book.getWorksheets().get(0).getCharts().get(0).toImage(options);

Constructor Summary
ImageOrPrintOptions()
          
 
Property Getters/Setters Summary
com.aspose.cells.ImageFormatgetChartImageType()
voidsetChartImageType(com.aspose.cells.ImageFormat value)
           Indicate the chart imagetype when converting.
DrawObjectEventHandlergetDrawObjectEventHandler()
voidsetDrawObjectEventHandler(DrawObjectEventHandler value)
           Implements this interface to get DrawObject and Bound when rendering.
java.lang.StringgetEmbededImageNameInSvg()
voidsetEmbededImageNameInSvg(java.lang.String value)
           Indicate the filename of embeded image in svg. This should be full path with directory like "c:\\xpsEmbeded"
intgetHorizontalResolution()
voidsetHorizontalResolution(int value)
           Gets or sets the horizontal resolution for generated images, in dots per inch. Applies generating image method except Emf format images.
com.aspose.cells.ImageFormatgetImageFormat()
voidsetImageFormat(com.aspose.cells.ImageFormat value)
           Gets or sets the format of the generated images. Don't apply the method that returns a Bitmap object.
booleanisCellAutoFit()
voidsetCellAutoFit(boolean value)
           Indicates whether the width and height of the cells is automatically fitted by cell value. The default value is false.
booleanisImageFitToPage()
voidsetImageFitToPage(boolean value)
           When set the value to true, the page only include the cells that have data. The default value is false.
booleangetOnePagePerSheet()
voidsetOnePagePerSheet(boolean value)
           If OnePagePerSheet is true , all content of one sheet will output to only one page in result. The paper size of pagesetup will be invalid, and the other settings of pagesetup will still take effect.
booleangetOnlyArea()
voidsetOnlyArea(boolean value)
           If this property is true , onle Area will be output, and no scale will take effect.
intgetPrintingPage()
voidsetPrintingPage(int value)
           Indicates which pages will not be printed. The value of the property is PrintingPageType integer constant.
booleangetPrintWithStatusDialog()
voidsetPrintWithStatusDialog(boolean value)
           If PrintWithStatusDialog = true , there will be a dialog that shows current print status. else no such dialog will show.
intgetQuality()
voidsetQuality(int value)
           Gets or sets a value determining the quality of the generated images to apply only when saving pages to the Jpeg format.
intgetSaveFormat()
voidsetSaveFormat(int value)
           Gets or sets the output file format type Support Tiff/XPS The value of the property is SaveFormat integer constant.
intgetTiffCompression()
voidsetTiffCompression(int value)
           Gets or sets the type of compression to apply only when saving pages to the Tiff format. The value of the property is TiffCompression integer constant.
intgetVerticalResolution()
voidsetVerticalResolution(int value)
           Gets or sets the vertical resolution for generated images, in dots per inch. Applies generating image method except Emf format image.
 

Constructor Detail

ImageOrPrintOptions

public ImageOrPrintOptions()

Property Getters/Setters Detail

getSaveFormat/setSaveFormat

public int getSaveFormat() / public void setSaveFormat(int value)
Gets or sets the output file format type Support Tiff/XPS The value of the property is SaveFormat integer constant.

getPrintWithStatusDialog/setPrintWithStatusDialog

public boolean getPrintWithStatusDialog() / public void setPrintWithStatusDialog(boolean value)
If PrintWithStatusDialog = true , there will be a dialog that shows current print status. else no such dialog will show.

getHorizontalResolution/setHorizontalResolution

public int getHorizontalResolution() / public void setHorizontalResolution(int value)
Gets or sets the horizontal resolution for generated images, in dots per inch. Applies generating image method except Emf format images. The default value is 96.

getVerticalResolution/setVerticalResolution

public int getVerticalResolution() / public void setVerticalResolution(int value)
Gets or sets the vertical resolution for generated images, in dots per inch. Applies generating image method except Emf format image. The default value is 96.

getTiffCompression/setTiffCompression

public int getTiffCompression() / public void setTiffCompression(int value)
Gets or sets the type of compression to apply only when saving pages to the Tiff format. The value of the property is TiffCompression integer constant. Has effect only when saving to TIFF. The default value is Lzw.

getPrintingPage/setPrintingPage

public int getPrintingPage() / public void setPrintingPage(int value)
Indicates which pages will not be printed. The value of the property is PrintingPageType integer constant.

getQuality/setQuality

public int getQuality() / public void setQuality(int value)
Gets or sets a value determining the quality of the generated images to apply only when saving pages to the Jpeg format. Has effect only when saving to JPEG. The value must be between 0 and 100. The default value is 100.

getImageFormat/setImageFormat

public com.aspose.cells.ImageFormat getImageFormat() / public void setImageFormat(com.aspose.cells.ImageFormat value)
Gets or sets the format of the generated images. Don't apply the method that returns a Bitmap object. The default value is ImageFormat.Bmp. Don't apply the method that returns a Bitmap object.

isCellAutoFit/setCellAutoFit

public boolean isCellAutoFit() / public void setCellAutoFit(boolean value)
Indicates whether the width and height of the cells is automatically fitted by cell value. The default value is false.

isImageFitToPage/setImageFitToPage

public boolean isImageFitToPage() / public void setImageFitToPage(boolean value)
When set the value to true, the page only include the cells that have data. The default value is false.

getOnePagePerSheet/setOnePagePerSheet

public boolean getOnePagePerSheet() / public void setOnePagePerSheet(boolean value)
If OnePagePerSheet is true , all content of one sheet will output to only one page in result. The paper size of pagesetup will be invalid, and the other settings of pagesetup will still take effect.

getDrawObjectEventHandler/setDrawObjectEventHandler

public DrawObjectEventHandler getDrawObjectEventHandler() / public void setDrawObjectEventHandler(DrawObjectEventHandler value)
Implements this interface to get DrawObject and Bound when rendering.

getChartImageType/setChartImageType

public com.aspose.cells.ImageFormat getChartImageType() / public void setChartImageType(com.aspose.cells.ImageFormat value)
Indicate the chart imagetype when converting.

getEmbededImageNameInSvg/setEmbededImageNameInSvg

public java.lang.String getEmbededImageNameInSvg() / public void setEmbededImageNameInSvg(java.lang.String value)
Indicate the filename of embeded image in svg. This should be full path with directory like "c:\\xpsEmbeded"

getOnlyArea/setOnlyArea

public boolean getOnlyArea() / public void setOnlyArea(boolean value)
If this property is true , onle Area will be output, and no scale will take effect.

See Also:
          Aspose.Cells Documentation - the home page for the Aspose.Cellss Product Documentation.
          Aspose.Cells Support Forum - our preferred method of support.