JpgViewOptions

Inheritance: java.lang.Object, com.groupdocs.viewer.options.BaseViewOptions, com.groupdocs.viewer.options.ViewOptions

All Implemented Interfaces: com.groupdocs.viewer.options.IMaxSizeOptions

public class JpgViewOptions extends ViewOptions implements IMaxSizeOptions

Provides options for rendering documents into JPG format.

Constructors

Constructor Description
JpgViewOptions(CreatePageStream createPageStream) Initializes new instance of JpgViewOptions class.
JpgViewOptions(CreatePageStream createPageStream, ReleasePageStream releasePageStream) Initializes new instance of JpgViewOptions class.
JpgViewOptions(PageStreamFactory pageStreamFactory) Initializes new instance of JpgViewOptions class.
JpgViewOptions() Initializes new instance of JpgViewOptions class.
JpgViewOptions(String filePathFormat) Initializes new instance of JpgViewOptions class.

Methods

Method Description
getMaxWidth() Max width of an output image in pixels.
setMaxWidth(int maxWidth) Max width of an output image in pixels.
getMaxHeight() Max height of an output image in pixels.
setMaxHeight(int maxHeight) Max height of an output image in pixels.
getQuality() Quality of the output image; Valid values are between 1 and 100; Default value is 90.
setQuality(byte value) Quality of the output image; Valid values are between 1 and 100; Default value is 90.
isExtractText() Enables text extraction.
setExtractText(boolean value) Enables text extraction.
getWidth() The width of the output image in pixels.
setWidth(int value) The width of the output image in pixels.
getHeight() The height of an output image in pixels.
setHeight(int value) The height of an output image in pixels.
getPageStreamFactory()

JpgViewOptions(CreatePageStream createPageStream)

public JpgViewOptions(CreatePageStream createPageStream)

Initializes new instance of JpgViewOptions class.

Parameters:

Parameter Type Description
createPageStream CreatePageStream The method that instantiates stream used to write output page data.

JpgViewOptions(CreatePageStream createPageStream, ReleasePageStream releasePageStream)

public JpgViewOptions(CreatePageStream createPageStream, ReleasePageStream releasePageStream)

Initializes new instance of JpgViewOptions class.

Parameters:

Parameter Type Description
createPageStream CreatePageStream The method that instantiates stream used to write output page data.
releasePageStream ReleasePageStream The method that releases stream created by method assigned to delegate that passed to createPageStream parameter.

JpgViewOptions(PageStreamFactory pageStreamFactory)

public JpgViewOptions(PageStreamFactory pageStreamFactory)

Initializes new instance of JpgViewOptions class.

Parameters:

Parameter Type Description
pageStreamFactory PageStreamFactory The factory which implements methods for creating and releasing output page stream.

JpgViewOptions()

public JpgViewOptions()

Initializes new instance of JpgViewOptions class.


This constructor initializes new instance of JpgViewOptions with “p_{0}.jpg” as file path format for the output files. The output files will be placed into current working directory of the application.

JpgViewOptions(String filePathFormat)

public JpgViewOptions(String filePathFormat)

Initializes new instance of JpgViewOptions class.

Parameters:

Parameter Type Description
filePathFormat java.lang.String The file path format e.g. ‘page_{0}.jpg’.

getMaxWidth()

public int getMaxWidth()

Max width of an output image in pixels.

Returns: int

setMaxWidth(int maxWidth)

public void setMaxWidth(int maxWidth)

Max width of an output image in pixels.

Parameters:

Parameter Type Description
maxWidth int

getMaxHeight()

public int getMaxHeight()

Max height of an output image in pixels.

Returns: int

setMaxHeight(int maxHeight)

public void setMaxHeight(int maxHeight)

Max height of an output image in pixels.

Parameters:

Parameter Type Description
maxHeight int

getQuality()

public final byte getQuality()

Quality of the output image; Valid values are between 1 and 100; Default value is 90.

Returns: byte

setQuality(byte value)

public final void setQuality(byte value)

Quality of the output image; Valid values are between 1 and 100; Default value is 90.

Parameters:

Parameter Type Description
value byte

isExtractText()

public final boolean isExtractText()

Enables text extraction.


This option might be useful when you want to add selectable text layer over the image.

Returns: boolean

setExtractText(boolean value)

public final void setExtractText(boolean value)

Enables text extraction.


This option might be useful when you want to add selectable text layer over the image.

Parameters:

Parameter Type Description
value boolean

getWidth()

public final int getWidth()

The width of the output image in pixels.

Returns: int

setWidth(int value)

public final void setWidth(int value)

The width of the output image in pixels.

Parameters:

Parameter Type Description
value int

getHeight()

public final int getHeight()

The height of an output image in pixels.

Returns: int

setHeight(int value)

public final void setHeight(int value)

The height of an output image in pixels.

Parameters:

Parameter Type Description
value int

getPageStreamFactory()

public final PageStreamFactory getPageStreamFactory()

Returns: PageStreamFactory