ViewOptions

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

public abstract class ViewOptions extends BaseViewOptions

Contains the rendering options.

The ViewOptions class extends the BaseViewOptions class and serves as a base class for rendering options in the GroupDocs.Viewer component. It encapsulates common settings and parameters that can be used for rendering various types of documents into different formats.

Note: The ViewOptions class should not be used directly, use HtmlViewOptions, PdfViewOptions, PngViewOptions and so on instead.

Constructors

Constructor Description
ViewOptions()

Methods

Method Description
getWatermark() Gets the text watermark applied to each page.
setWatermark(Watermark value) Sets the text watermark to be applied to each page.
rotatePage(int pageNumber, Rotation rotation) Applies a clockwise rotation to the specified page.
getPageRotations() Retrieves the page rotations.
isPageRotationsInitialized_Internal() To prevent creating the instance just to check that it is empty

ViewOptions()

public ViewOptions()

getWatermark()

public final Watermark getWatermark()

Gets the text watermark applied to each page.

In case both #setWatermark(Watermark).setWatermark(Watermark) and #getPageRotations().getPageRotations() are specified, the watermark will be applied to the rotated pages. For details, see the documentation.

Returns: Watermark - the text watermark applied to each page.

setWatermark(Watermark value)

public final void setWatermark(Watermark value)

Sets the text watermark to be applied to each page.

In case both ViewOptions.Watermark and #getPageRotations().getPageRotations() are specified, the watermark will be applied to the rotated pages. For details, see the documentation.

Parameters:

Parameter Type Description
value Watermark The text watermark to be set.

rotatePage(int pageNumber, Rotation rotation)

public final void rotatePage(int pageNumber, Rotation rotation)

Applies a clockwise rotation to the specified page.

For details, see the documentation.

Parameters:

Parameter Type Description
pageNumber int The page number, must be strictly greater than 0.
rotation Rotation The rotation value.

getPageRotations()

public Map<Integer,Rotation> getPageRotations()

Retrieves the page rotations.

If both setWatermark(Watermark) and getPageRotations() are specified, the watermark will be applied to the rotated pages. For details, see the documentation.

Returns: java.util.Map<java.lang.Integer,com.groupdocs.viewer.options.Rotation> - a map containing the page numbers as keys and their corresponding rotations as values.

isPageRotationsInitialized_Internal()

public boolean isPageRotationsInitialized_Internal()

To prevent creating the instance just to check that it is empty

Returns: boolean