java.lang.Object
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
book.getWorksheets().get(0).getCharts().get(0).toImage("res.bmp", options);
|
Property Getters/Setters Summary |
boolean | getAllColumnsInOnePagePerSheet() | |
void | setAllColumnsInOnePagePerSheet(boolean value) | |
|
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.
|
com.aspose.cells.ImageFormat | getChartImageType() | |
void | setChartImageType(com.aspose.cells.ImageFormat value) | |
|
Indicate the chart imagetype when converting.
|
boolean | getCheckWorkbookDefaultFont() | |
void | setCheckWorkbookDefaultFont(boolean 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.
|
int | getDefaultEditLanguage() | |
void | setDefaultEditLanguage(int value) | |
|
Gets or sets default edit language.
The value of the property is DefaultEditLanguage integer constant. |
java.lang.String | getDefaultFont() | |
void | setDefaultFont(java.lang.String 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.
|
DrawObjectEventHandler | getDrawObjectEventHandler() | |
void | setDrawObjectEventHandler(DrawObjectEventHandler value) | |
|
Implements this interface to get DrawObject and Bound when rendering.
|
java.lang.String | getEmbededImageNameInSvg() | |
void | setEmbededImageNameInSvg(java.lang.String value) | |
|
Indicate the filename of embeded image in svg.
This should be full path with directory like "c:\\xpsEmbeded"
|
int | getGridlineType() | |
void | setGridlineType(int value) | |
|
Gets or sets gridline type.
The value of the property is GridlineType integer constant. |
int | getHorizontalResolution() | |
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.
|
com.aspose.cells.ImageFormat | getImageFormat() | |
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.
|
int | getImageType() | |
void | setImageType(int value) | |
|
Gets or sets the format of the generated images.
Don't apply the method that returns a Bitmap object.
The value of the property is ImageType integer constant. |
boolean | isCellAutoFit() | |
void | setCellAutoFit(boolean value) | |
|
Indicates whether the width and height of the cells is automatically fitted by cell value.
The default value is false.
|
boolean | isFontSubstitutionCharGranularity() | |
void | setFontSubstitutionCharGranularity(boolean value) | |
|
Indicates whether only substitute the font of character when the cell font is not compatibility for it.
|
boolean | isImageFitToPage() | |
void | setImageFitToPage(boolean value) | |
|
When set the value to true, the page only include the cells that have data.
The default value is false.
|
boolean | getOnePagePerSheet() | |
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.
|
boolean | getOnlyArea() | |
void | setOnlyArea(boolean value) | |
|
If this property is true , onle Area will be output, and no scale will take effect.
|
boolean | getOutputBlankPageWhenNothingToPrint() | |
void | setOutputBlankPageWhenNothingToPrint(boolean value) | |
|
Indicates whether to output a blank page when there is nothing to print.
|
int | getPageCount() | |
void | setPageCount(int value) | |
|
Gets or sets the number of pages to save.
|
int | getPageIndex() | |
void | setPageIndex(int value) | |
|
Gets or sets the 0-based index of the first page to save.
|
IPageSavingCallback | getPageSavingCallback() | |
void | setPageSavingCallback(IPageSavingCallback value) | |
|
Control/Indicate progress of page saving process.
|
int | getPrintingPage() | |
void | setPrintingPage(int value) | |
|
Indicates which pages will not be printed.
The value of the property is PrintingPageType integer constant. |
boolean | getPrintWithStatusDialog() | |
void | setPrintWithStatusDialog(boolean value) | |
|
If PrintWithStatusDialog = true , there will be a dialog that shows current print status.
else no such dialog will show.
|
int | getQuality() | |
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. The default value is 100
|
int | getSaveFormat() | |
void | setSaveFormat(int value) | |
|
Gets or sets the output file format type
Support Tiff/XPS
The value of the property is SaveFormat integer constant. |
boolean | getSVGFitToViewPort() | |
void | setSVGFitToViewPort(boolean value) | |
|
if this property is true, the generated svg will fit to view port.
|
int | getTextCrossType() | |
void | setTextCrossType(int 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. |
int | getTiffColorDepth() | |
void | setTiffColorDepth(int 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. |
int | getTiffCompression() | |
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. |
boolean | getTransparent() | |
void | setTransparent(boolean value) | |
|
Indicates if the background of generated image should be transparent.
|
int | getVerticalResolution() | |
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.
|
IWarningCallback | getWarningCallback() | |
void | setWarningCallback(IWarningCallback value) | |
|
Gets or sets warning callback.
|
|
Method Summary |
void | setDesiredSize(int desiredWidth, int desiredHeight) | |
|
Sets desired width and height of image.
|
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.
setSaveFormat | |
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.
setPrintWithStatusDialog | |
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.
setHorizontalResolution | |
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.
setVerticalResolution | |
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.
setTiffCompression | |
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.
getTiffColorDepth/setTiffColorDepth | |
public int getTiffColorDepth() / public void setTiffColorDepth(int 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.
Has effect only when saving to TIFF.
If TiffCompression is set to CCITT3, CCITT4, this will not take effect, the bit depth of the generated tiff image will be always 1.
setTiffColorDepth | |
public void setTiffColorDepth(int 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.
Has effect only when saving to TIFF.
If TiffCompression is set to CCITT3, CCITT4, this will not take effect, the bit depth of the generated tiff image will be always 1.
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.
setPrintingPage | |
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. The default value is 100
Has effect only when saving to JPEG.
The value must be between 0 and 100.
The default value is 100.
setQuality | |
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. The default value is 100
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.
NOTE: This member is now obsolete. Instead,
please use ImageOrPrintOptions.ImageType property.
This property will be removed 12 months later since April. 2018.
Aspose apologizes for any inconvenience you may have experienced.
setImageFormat | |
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.
NOTE: This member is now obsolete. Instead,
please use ImageOrPrintOptions.ImageType property.
This property will be removed 12 months later since April. 2018.
Aspose apologizes for any inconvenience you may have experienced.
getImageType/setImageType | |
public int getImageType() / public void setImageType(int value)
|
-
Gets or sets the format of the generated images.
Don't apply the method that returns a
Bitmap object.
The value of the property is ImageType integer constant.
The default value is ImageFormat.Bmp.
Don't apply the method that returns a Bitmap object.
setImageType | |
public void setImageType(int value)
|
-
Gets or sets the format of the generated images.
Don't apply the method that returns a
Bitmap object.
The value of the property is ImageType integer constant.
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.
setCellAutoFit | |
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.
setImageFitToPage | |
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.
setOnePagePerSheet | |
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.
getAllColumnsInOnePagePerSheet/setAllColumnsInOnePagePerSheet | |
public boolean getAllColumnsInOnePagePerSheet() / public void setAllColumnsInOnePagePerSheet(boolean value)
|
-
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.
setAllColumnsInOnePagePerSheet | |
public void setAllColumnsInOnePagePerSheet(boolean value)
|
-
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.
-
Implements this interface to get DrawObject and Bound when rendering.
-
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.
setChartImageType | |
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"
setEmbededImageNameInSvg | |
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"
getSVGFitToViewPort/setSVGFitToViewPort | |
public boolean getSVGFitToViewPort() / public void setSVGFitToViewPort(boolean value)
|
-
if this property is true, the generated svg will fit to view port.
setSVGFitToViewPort | |
public void setSVGFitToViewPort(boolean value)
|
-
if this property is true, the generated svg will fit to view port.
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.
setOnlyArea | |
public void setOnlyArea(boolean value)
|
-
If this property is true , onle Area will be output, and no scale will take effect.
getTransparent/setTransparent | |
public boolean getTransparent() / public void setTransparent(boolean value)
|
-
Indicates if the background of generated image should be transparent.
The default value is false. That means the background of the generated images is white.
setTransparent | |
public void setTransparent(boolean value)
|
-
Indicates if the background of generated image should be transparent.
The default value is false. That means the background of the generated images is white.
-
Gets or sets warning callback.
-
Gets or sets warning callback.
-
Control/Indicate progress of page saving process.
-
Control/Indicate progress of page saving process.
isFontSubstitutionCharGranularity/setFontSubstitutionCharGranularity | |
public boolean isFontSubstitutionCharGranularity() / public void setFontSubstitutionCharGranularity(boolean value)
|
-
Indicates whether only substitute the font of character when the cell font is not compatibility for it.
Default is false. We will try default font of Workbook and PdfSaveOption/system for cell font first.
setFontSubstitutionCharGranularity | |
public void setFontSubstitutionCharGranularity(boolean value)
|
-
Indicates whether only substitute the font of character when the cell font is not compatibility for it.
Default is false. We will try default font of Workbook and PdfSaveOption/system for cell font first.
getPageIndex/setPageIndex | |
public int getPageIndex() / public void setPageIndex(int value)
|
-
Gets or sets the 0-based index of the first page to save.
Default is 0.
setPageIndex | |
public void setPageIndex(int value)
|
-
Gets or sets the 0-based index of the first page to save.
Default is 0.
getPageCount/setPageCount | |
public int getPageCount() / public void setPageCount(int value)
|
-
Gets or sets the number of pages to save.
Default is System.Int32.MaxValue which means all pages will be rendered..
setPageCount | |
public void setPageCount(int value)
|
-
Gets or sets the number of pages to save.
Default is System.Int32.MaxValue which means all pages will be rendered..
getDefaultFont/setDefaultFont | |
public java.lang.String getDefaultFont() / public void setDefaultFont(java.lang.String 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.
setDefaultFont | |
public void setDefaultFont(java.lang.String 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.
getCheckWorkbookDefaultFont/setCheckWorkbookDefaultFont | |
public boolean getCheckWorkbookDefaultFont() / public void setCheckWorkbookDefaultFont(boolean 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.
Default is true.
setCheckWorkbookDefaultFont | |
public void setCheckWorkbookDefaultFont(boolean 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.
Default is true.
getOutputBlankPageWhenNothingToPrint/setOutputBlankPageWhenNothingToPrint | |
public boolean getOutputBlankPageWhenNothingToPrint() / public void setOutputBlankPageWhenNothingToPrint(boolean value)
|
-
Indicates whether to output a blank page when there is nothing to print.
Default is false.
setOutputBlankPageWhenNothingToPrint | |
public void setOutputBlankPageWhenNothingToPrint(boolean value)
|
-
Indicates whether to output a blank page when there is nothing to print.
Default is false.
getGridlineType/setGridlineType | |
public int getGridlineType() / public void setGridlineType(int value)
|
-
Gets or sets gridline type.
The value of the property is GridlineType integer constant.
Default is Dotted type.
setGridlineType | |
public void setGridlineType(int value)
|
-
Gets or sets gridline type.
The value of the property is GridlineType integer constant.
Default is Dotted type.
getTextCrossType/setTextCrossType | |
public int getTextCrossType() / public void setTextCrossType(int 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.
setTextCrossType | |
public void setTextCrossType(int 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.
getDefaultEditLanguage/setDefaultEditLanguage | |
public int getDefaultEditLanguage() / public void setDefaultEditLanguage(int value)
|
-
Gets or sets default edit language.
The value of the property is DefaultEditLanguage integer constant.
It may dispaly/render different layouts for text paragraph when different edit languages is set.
Default is #Error Cref: !:DefaultEditLanguage.Auto.
setDefaultEditLanguage | |
public void setDefaultEditLanguage(int value)
|
-
Gets or sets default edit language.
The value of the property is DefaultEditLanguage integer constant.
It may dispaly/render different layouts for text paragraph when different edit languages is set.
Default is #Error Cref: !:DefaultEditLanguage.Auto.
setDesiredSize | |
public void setDesiredSize(int desiredWidth, int desiredHeight) |
-
Sets desired width and height of image.
- Parameters:
desiredWidth - desired width in pixelsdesiredHeight - desired height in pixels
See Also:
Aspose.Cells Documentation - the home page for the Aspose.Cells Product Documentation.
Aspose.Cells Support Forum - our preferred method of support.