PreviewOptions

Inheritance: java.lang.Object, com.groupdocs.merger.domain.options.PageOptions

All Implemented Interfaces: com.groupdocs.merger.domain.options.interfaces.IPreviewOptions

public class PreviewOptions extends PageOptions implements IPreviewOptions

Represents document preview options.

Constructors

Constructor Description
PreviewOptions(PageStreamFactory pageStreamFactory, int previewMode) Initializes a new instance of the PreviewOptions class.
PreviewOptions(PageStreamFactory pageStreamFactory, int previewMode, int[] pageNumbers) Initializes a new instance of the PreviewOptions class.
PreviewOptions(PageStreamFactory pageStreamFactory, int previewMode, int startNumber, int endNumber) Initializes a new instance of the PreviewOptions class.
PreviewOptions(PageStreamFactory pageStreamFactory, int previewMode, int startNumber, int endNumber, int mode) Initializes a new instance of the PreviewOptions class.

Methods

Method Description
getWidth() Preview width.
setWidth(int value) Preview width.
getHeight() Preview height.
setHeight(int value) Preview height.
getResolution() Image resolution.
setResolution(int value) Image resolution.
getMode() Mode for preview.
validate(FileType fileType) Validates the preview options.
getPathByPageNumber(int pageNumber, String extension) Gets the full file path of previewed document by page number with defined extension.
getPageStreamFactory() PageStreamFactory for create or release output page preview stream.

PreviewOptions(PageStreamFactory pageStreamFactory, int previewMode)

public PreviewOptions(PageStreamFactory pageStreamFactory, int previewMode)

Initializes a new instance of the PreviewOptions class.

Parameters:

Parameter Type Description
pageStreamFactory PageStreamFactory The method that instantiates stream used to write output page data.
previewMode int The preview mode of Mode (#getMode.getMode/#setMode(int).setMode(int))

PreviewOptions(PageStreamFactory pageStreamFactory, int previewMode, int[] pageNumbers)

public PreviewOptions(PageStreamFactory pageStreamFactory, int previewMode, int[] pageNumbers)

Initializes a new instance of the PreviewOptions class.

Parameters:

Parameter Type Description
pageStreamFactory PageStreamFactory The method that instantiates stream used to write output page data.
previewMode int The preview mode of Mode (#getMode.getMode/#setMode(int).setMode(int))
pageNumbers int[] Page numbers.

PreviewOptions(PageStreamFactory pageStreamFactory, int previewMode, int startNumber, int endNumber)

public PreviewOptions(PageStreamFactory pageStreamFactory, int previewMode, int startNumber, int endNumber)

Initializes a new instance of the PreviewOptions class.

Parameters:

Parameter Type Description
pageStreamFactory PageStreamFactory The method that instantiates stream used to write output page data.
previewMode int The preview mode of Mode (#getMode.getMode/#setMode(int).setMode(int))
startNumber int The start page number.
endNumber int The end page number.

PreviewOptions(PageStreamFactory pageStreamFactory, int previewMode, int startNumber, int endNumber, int mode)

public PreviewOptions(PageStreamFactory pageStreamFactory, int previewMode, int startNumber, int endNumber, int mode)

Initializes a new instance of the PreviewOptions class.

Parameters:

Parameter Type Description
pageStreamFactory PageStreamFactory The method that instantiates stream used to write output page data.
previewMode int The preview mode of Mode (#getMode.getMode/#setMode(int).setMode(int))
startNumber int The start page number.
endNumber int The end page number.
mode int The range mode.

getWidth()

public final int getWidth()

Preview width.

Returns: int

setWidth(int value)

public final void setWidth(int value)

Preview width.

Parameters:

Parameter Type Description
value int

getHeight()

public final int getHeight()

Preview height.

Returns: int

setHeight(int value)

public final void setHeight(int value)

Preview height.

Parameters:

Parameter Type Description
value int

getResolution()

public final int getResolution()

Image resolution.

Returns: int

setResolution(int value)

public final void setResolution(int value)

Image resolution.

Parameters:

Parameter Type Description
value int

getMode()

public final int getMode()

Mode for preview.

Returns: int

validate(FileType fileType)

public final void validate(FileType fileType)

Validates the preview options.

Parameters:

Parameter Type Description
fileType FileType The file type.

getPathByPageNumber(int pageNumber, String extension)

public final String getPathByPageNumber(int pageNumber, String extension)

Gets the full file path of previewed document by page number with defined extension.

Parameters:

Parameter Type Description
pageNumber int Page number of preview.
extension java.lang.String Extension of file.

Returns: java.lang.String - The full file path.

getPageStreamFactory()

public PageStreamFactory getPageStreamFactory()

PageStreamFactory for create or release output page preview stream.

Returns: PageStreamFactory