ImageOrPrintOptions Class
Allows to specify options when rendering worksheet to images, printing worksheet or rendering chart to image.
Inheritance Hierarchy
SystemObject
  Aspose.Cells.RenderingImageOrPrintOptions

Namespace: Aspose.Cells.Rendering
Assembly: Aspose.Cells (in Aspose.Cells.dll) Version: 19.11.0.0 (19.11)
Syntax
public class ImageOrPrintOptions

The ImageOrPrintOptions type exposes the following members.

Constructors
  NameDescription
Public methodImageOrPrintOptions
Initializes a new instance of the ImageOrPrintOptions class
Properties
  NameDescription
Public propertyAllColumnsInOnePagePerSheet
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.
Public propertyChartImageType
Indicate the chart imagetype when converting.
Public propertyCheckWorkbookDefaultFont
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.
Public propertyCustomPrintPageEventHandler
Client can special output to printer when print each page using this EventHandler
Public propertyCustomQueryPageSettingsEventHandler
Client can control page setting of printer when print each page using this EventHandler
Public propertyDefaultFont
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.
Public propertyDrawObjectEventHandler
Implements this interface to get DrawObject and Bound when rendering.
Public propertyEmbededImageNameInSvg
Indicate the filename of embeded image in svg. This should be full path with directory like "c:\\xpsEmbeded"
Public propertyEmfType
Gets or sets an EmfType that specifies the format of the Metafile..
Remarks
The default value is EmfPlusDual.
Public propertyGridlineType
Gets or sets gridline type.
Public propertyHorizontalResolution
Gets or sets the horizontal resolution for generated images, in dots per inch. Applies generating image method except Emf format images.
Public propertyImageFormat Obsolete.
Gets or sets the format of the generated images. Don't apply the method that returns a Bitmap object.
Public propertyImageType
Gets or sets the format of the generated images. Don't apply the method that returns a Bitmap object.
Public propertyIsCellAutoFit
Indicates whether the width and height of the cells is automatically fitted by cell value. The default value is false.
Public propertyIsFontSubstitutionCharGranularity
Indicates whether only substitute the font of character when the cell font is not compatibility for it.
Public propertyIsImageFitToPage Obsolete.
When set the value to true, the page only include the cells that have data. The default value is false.
Public propertyOnePagePerSheet
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.
Public propertyOnlyArea
If this property is true , onle Area will be output, and no scale will take effect.
Public propertyOutputBlankPageWhenNothingToPrint
Indicates whether to output a blank page when there is nothing to print.
Public propertyPageCount
Gets or sets the number of pages to save.
Public propertyPageIndex
Gets or sets the 0-based index of the first page to save.
Public propertyPageSavingCallback
Control/Indicate progress of page saving process.
Public propertyPixelFormat
Gets or sets the pixel format for the generated images.
Public propertyPrintingPage
Indicates which pages will not be printed.
Public propertyPrintWithStatusDialog
If PrintWithStatusDialog = true , there will be a dialog that shows current print status. else no such dialog will show.
Public propertyQuality
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
Public propertySaveFormat
Gets or sets the output file format type Support Tiff/XPS
Public propertySmoothingMode
Specifies whether smoothing (antialiasing) is applied to lines and curves and the edges of filled areas. The defaul value is SmoothingMode.None
Public propertySVGFitToViewPort
if this property is true, the generated svg will fit to view port.
Public propertyTextCrossType
Gets or sets displaying text type when the text width is larger than cell width.
Public propertyTextRenderingHint
Specifies the quality of text rendering. The defaul value is TextRenderingHint.SystemDefault
Public propertyTiffColorDepth
Gets or sets bit depth to apply only when saving pages to the Tiff format.
Public propertyTiffCompression
Gets or sets the type of compression to apply only when saving pages to the Tiff format.
Public propertyTransparent
Indicates if the background of generated image should be transparent.
Public propertyVerticalResolution
Gets or sets the vertical resolution for generated images, in dots per inch. Applies generating image method except Emf format image.
Public propertyWarningCallback
Gets or sets warning callback.
Methods
  NameDescription
Public methodEquals
Determines whether the specified Object is equal to the current Object.
(Inherited from Object.)
Protected methodFinalize
Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
(Inherited from Object.)
Public methodGetHashCode
Serves as a hash function for a particular type.
(Inherited from Object.)
Public methodGetType
Gets the type of the current instance.
(Inherited from Object.)
Protected methodMemberwiseClone
Creates a shallow copy of the current Object.
(Inherited from Object.)
Public methodSetDesiredSize
Sets desired width and height of image.
Public methodToString
Returns a string that represents the current object.
(Inherited from Object.)
Examples
[C#]

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

//set Horizontal resolution
options.HorizontalResolution = 200;

//set Vertica; Resolution
options.VerticalResolution = 300;

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

//Save chart as Image using ImageOrPrint Options
Bitmap chartObject = book.Worksheets[0].Charts[0].ToImage(options);

[VB.NET]

'Set Image Or Print Options
Dim options As New ImageOrPrintOptions()

'set Horizontal resolution
options.HorizontalResolution = 200

'set Vertica; Resolution
options.VerticalResolution = 300

'Instantiate Workbook
Dim book As New Workbook("c:\test.xls")

'Save chart as Image using ImageOrPrint Options
Dim chartObject As Bitmap = book.Worksheets(0).Charts(0).ToImage(options)
See Also