ImageDevice

Inheritance: java.lang.Object, com.aspose.pdf.devices.Device, com.aspose.pdf.devices.PageDevice

public abstract class ImageDevice extends PageDevice

An abstract class for image devices.

Constructors

ConstructorDescription
ImageDevice()Abstract initializer for ImageDevice descendants, set resolution to 150x150.
ImageDevice(Resolution resolution)Abstract initializer for ImageDevice descendants.
ImageDevice(int width, int height)Initializes a new instance of the JpegDevice class with provided image dimensions and default resolution (=150).
ImageDevice(PageSize pageSize)Initializes a new instance of the JpegDevice class with provided image dimensions and default resolution (=150).
ImageDevice(int width, int height, Resolution resolution)Initializes a new instance of the JpegDevice class with provided image dimensions and resolution.
ImageDevice(PageSize pageSize, Resolution resolution)Initializes a new instance of the JpegDevice class with provided image dimensions and resolution.

Methods

MethodDescription
isShadingPerformanceHigh()Is the performance of shading processes High.
setShadingPerformanceHigh(boolean value)Sets the the performance of shading processes High or not.
getCoordinateType()Gets the page coordinate type (Media/Crop boxes).
setCoordinateType(int value)Sets the page coordinate type (Media/Crop boxes).
getRenderingOptions()Gets rendering options.
setRenderingOptions(RenderingOptions value)Sets rendering options.
getFormPresentationMode()Gets form presentation mode.
setFormPresentationMode(int value)Sets form presentation mode.
getResolution()Gets image resolution.
getWidth()Gets image output width.
getHeight()Gets image output height.
getCropRectangle()Get rectangle that defines the area that will be converted into a picture.
setCropRectangle(Rectangle cropRectangle)Set rectangle that defines the area that will be converted into a picture.

ImageDevice()

public ImageDevice()

Abstract initializer for ImageDevice descendants, set resolution to 150x150.

ImageDevice(Resolution resolution)

public ImageDevice(Resolution resolution)

Abstract initializer for ImageDevice descendants.

Parameters:

ParameterTypeDescription
resolutionResolutionResolution for the result image file, see Resolution class.

ImageDevice(int width, int height)

public ImageDevice(int width, int height)

Initializes a new instance of the JpegDevice class with provided image dimensions and default resolution (=150).

Parameters:

ParameterTypeDescription
widthintImage output width.
heightintImage output height.

ImageDevice(PageSize pageSize)

public ImageDevice(PageSize pageSize)

Initializes a new instance of the JpegDevice class with provided image dimensions and default resolution (=150).

Parameters:

ParameterTypeDescription
pageSizePageSizePage size of the output image.

ImageDevice(int width, int height, Resolution resolution)

public ImageDevice(int width, int height, Resolution resolution)

Initializes a new instance of the JpegDevice class with provided image dimensions and resolution.

Parameters:

ParameterTypeDescription
widthintImage output width.
heightintImage output height.
resolutionResolutionResolution for the result image file, see Resolution class.

ImageDevice(PageSize pageSize, Resolution resolution)

public ImageDevice(PageSize pageSize, Resolution resolution)

Initializes a new instance of the JpegDevice class with provided image dimensions and resolution.

Parameters:

ParameterTypeDescription
pageSizePageSizePage size of the output image.
resolutionResolutionResolution for the result image file, see Resolution class.

isShadingPerformanceHigh()

public static boolean isShadingPerformanceHigh()

Is the performance of shading processes High. By default it true.

Returns: boolean - boolean value

setShadingPerformanceHigh(boolean value)

public static void setShadingPerformanceHigh(boolean value)

Sets the the performance of shading processes High or not.

Parameters:

ParameterTypeDescription
valuebooleanboolean value

getCoordinateType()

public int getCoordinateType()

Gets the page coordinate type (Media/Crop boxes). CropBox value is used by default.

Returns: int - PageCoordinateType element

setCoordinateType(int value)

public void setCoordinateType(int value)

Sets the page coordinate type (Media/Crop boxes). CropBox value is used by default.

Parameters:

ParameterTypeDescription
valueintPageCoordinateType element

getRenderingOptions()

public RenderingOptions getRenderingOptions()

Gets rendering options.

Returns: RenderingOptions - RenderingOptions element

setRenderingOptions(RenderingOptions value)

public void setRenderingOptions(RenderingOptions value)

Sets rendering options.

Parameters:

ParameterTypeDescription
valueRenderingOptionsRenderingOptions element

getFormPresentationMode()

public int getFormPresentationMode()

Gets form presentation mode.

Returns: int - FormPresentationMode element

setFormPresentationMode(int value)

public void setFormPresentationMode(int value)

Sets form presentation mode.

Parameters:

ParameterTypeDescription
valueintFormPresentationMode element

getResolution()

public Resolution getResolution()

Gets image resolution.

Returns: Resolution - Resolution element

getWidth()

public int getWidth()

Gets image output width.

Returns: int - int value

getHeight()

public int getHeight()

Gets image output height.

Returns: int - int value

getCropRectangle()

public Rectangle getCropRectangle()

Get rectangle that defines the area that will be converted into a picture. The default is null, in which case the whole page is converted to an image.

Returns: Rectangle - Rectangle object

setCropRectangle(Rectangle cropRectangle)

public void setCropRectangle(Rectangle cropRectangle)

Set rectangle that defines the area that will be converted into a picture. The default is null, in which case the whole page is converted to an image.

Parameters:

ParameterTypeDescription
cropRectangleRectangleRectangle object