Example:
# Set Image Or Print Options options = ImageOrPrintOptions() # set Horizontal resolution options.setHorizontalResolution(200) # set Vertica Resolution options.setVerticalResolution(300) # Instantiate Workbook book = Workbook("Book2.xlsx") # Save chart as Image using ImageOrPrint Options book.getWorksheets().get(3).getCharts().get(0).toImage("chart.png", options)
Constructor Summary |
---|
Property Getters/Setters Summary | ||
---|---|---|
method | getAllColumnsInOnePagePerSheet() | |
method | ||
If AllColumnsInOnePagePerSheet is true , all column content of one sheet will output to only one page in result. The width of paper size of pagesetup will be invalid, and the other settings of pagesetup will still take effect. | ||
method | getChartImageType() | |
method | setChartImageType(value) | |
Indicate the chart imagetype when converting. default value: PNG. | ||
method | getCheckWorkbookDefaultFont() | |
method | setCheckWorkbookDefaultFont(value) | |
When characters in the Excel are Unicode and not be set with correct font in cell style, They may appear as block in pdf,image. Set this to true to try to use workbook's default font to show these characters first. | ||
method | getDefaultEditLanguage() | |
method | setDefaultEditLanguage(value) | |
Gets or sets default edit language. The value of the property is DefaultEditLanguage integer constant. | ||
method | getDefaultFont() | |
method | setDefaultFont(value) | |
When characters in the Excel are Unicode and not be set with correct font in cell style, They may appear as block in pdf,image. Set the DefaultFont such as MingLiu or MS Gothic to show these characters. If this property is not set, Aspose.Cells will use system default font to show these unicode characters. | ||
method | getDrawObjectEventHandler() | |
method | setDrawObjectEventHandler(value) | |
Implements this interface to get DrawObject and Bound when rendering. | ||
method | getEmbededImageNameInSvg() | |
method | setEmbededImageNameInSvg(value) | |
Indicate the filename of embedded image in svg. This should be full path with directory like "c:\\xpsEmbedded" | ||
method | getGridlineType() | |
method | setGridlineType(value) | |
Gets or sets gridline type. The value of the property is GridlineType integer constant. | ||
method | getHorizontalResolution() | |
method | setHorizontalResolution(value) | |
Gets or sets the horizontal resolution for generated images, in dots per inch. Applies generating image method except Emf format images. | ||
method | getImageFormat() | |
method | setImageFormat(value) | |
Gets or sets the format of the generated images. | ||
method | getImageType() | |
method | setImageType(value) | |
Gets or sets the format of the generated images. default value: PNG. The value of the property is ImageType integer constant. | ||
method | isCellAutoFit() | |
method | setCellAutoFit(value) | |
Indicates whether the width and height of the cells is automatically fitted by cell value. The default value is false. | ||
method | isFontSubstitutionCharGranularity() | |
method | ||
Indicates whether to only substitute the font of character when the cell font is not compatibility for it. | ||
method | isImageFitToPage() | |
method | setImageFitToPage(value) | |
When set the value to true, the page only include the cells that have data. The default value is false. | ||
method | isOptimized() | |
method | setOptimized(value) | |
Indicates whether to optimize the output elements. | ||
method | getOnePagePerSheet() | |
method | setOnePagePerSheet(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. | ||
method | getOnlyArea() | |
method | setOnlyArea(value) | |
If this property is true , one Area will be output, and no scale will take effect. | ||
method | getOutputBlankPageWhenNothingToPrint() | |
method | ||
Indicates whether to output a blank page when there is nothing to print. | ||
method | getPageCount() | |
method | setPageCount(value) | |
Gets or sets the number of pages to save. | ||
method | getPageIndex() | |
method | setPageIndex(value) | |
Gets or sets the 0-based index of the first page to save. | ||
method | getPageSavingCallback() | |
method | setPageSavingCallback(value) | |
Control/Indicate progress of page saving process. | ||
method | getPrintingPage() | |
method | setPrintingPage(value) | |
Indicates which pages will not be printed. The value of the property is PrintingPageType integer constant. | ||
method | getPrintWithStatusDialog() | |
method | setPrintWithStatusDialog(value) | |
If PrintWithStatusDialog = true , there will be a dialog that shows current print status. else no such dialog will show. | ||
method | getQuality() | |
method | setQuality(value) | |
Gets or sets a value determining the quality of the generated images
to apply only when saving pages to the Jpeg format. The default value is 100
|
||
method | getSaveFormat() | |
method | setSaveFormat(value) | |
Gets or sets the output file format type Support Tiff/XPS The value of the property is SaveFormat integer constant. | ||
method | getSVGFitToViewPort() | |
method | setSVGFitToViewPort(value) | |
if this property is true, the generated svg will fit to view port. | ||
method | getTextCrossType() | |
method | setTextCrossType(value) | |
Gets or sets displaying text type when the text width is larger than cell width. The value of the property is TextCrossType integer constant. | ||
method | getTiffColorDepth() | |
method | setTiffColorDepth(value) | |
Gets or sets bit depth to apply only when saving pages to the Tiff format.
The value of the property is ColorDepth integer constant. |
||
method | getTiffCompression() | |
method | setTiffCompression(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. |
||
method | getTransparent() | |
method | setTransparent(value) | |
Indicates if the background of generated image should be transparent. | ||
method | getVerticalResolution() | |
method | setVerticalResolution(value) | |
Gets or sets the vertical resolution for generated images, in dots per inch. Applies generating image method except Emf format image. |
Method Summary | ||
---|---|---|
method | setDesiredSize(desiredWidth, desiredHeight) | |
Sets desired width and height of image.
|
int getSaveFormat() / setSaveFormat(value)
boolean getPrintWithStatusDialog() / setPrintWithStatusDialog(value)
int getHorizontalResolution() / setHorizontalResolution(value)
int getVerticalResolution() / setVerticalResolution(value)
int getTiffCompression() / setTiffCompression(value)
Tiff
format.
The value of the property is TiffCompression integer constant.int getTiffColorDepth() / setTiffColorDepth(value)
Tiff
format.
The value of the property is ColorDepth integer constant.int getPrintingPage() / setPrintingPage(value)
int getQuality() / setQuality(value)
Jpeg
format. The default value is 100
ImageFormat getImageFormat() / setImageFormat(value)
int getImageType() / setImageType(value)
boolean isCellAutoFit() / setCellAutoFit(value)
boolean isImageFitToPage() / setImageFitToPage(value)
boolean getOnePagePerSheet() / setOnePagePerSheet(value)
boolean getAllColumnsInOnePagePerSheet() / setAllColumnsInOnePagePerSheet(value)
DrawObjectEventHandler getDrawObjectEventHandler() / setDrawObjectEventHandler(value)
ImageFormat getChartImageType() / setChartImageType(value)
String getEmbededImageNameInSvg() / setEmbededImageNameInSvg(value)
boolean getSVGFitToViewPort() / setSVGFitToViewPort(value)
boolean getOnlyArea() / setOnlyArea(value)
boolean getTransparent() / setTransparent(value)
IPageSavingCallback getPageSavingCallback() / setPageSavingCallback(value)
boolean isFontSubstitutionCharGranularity() / setFontSubstitutionCharGranularity(value)
int getPageIndex() / setPageIndex(value)
int getPageCount() / setPageCount(value)
boolean isOptimized() / setOptimized(value)
String getDefaultFont() / setDefaultFont(value)
boolean getCheckWorkbookDefaultFont() / setCheckWorkbookDefaultFont(value)
boolean getOutputBlankPageWhenNothingToPrint() / setOutputBlankPageWhenNothingToPrint(value)
int getGridlineType() / setGridlineType(value)
int getTextCrossType() / setTextCrossType(value)
int getDefaultEditLanguage() / setDefaultEditLanguage(value)