Position

Contents
[ ]

Inheritance: java.lang.Object, java.lang.Enum

public enum Position extends Enum<Position>

Defines watermark position.

The Position enum represents different positions for a watermark in the GroupDocs.Viewer component. It provides a set of predefined positions that can be used to specify the placement of a watermark on a document or image during the rendering process.

Example usage:


 Watermark watermark = new Watermark("Watermark");
 watermark.setPosition(Position.DIAGONAL);
 watermark.setColor(java.awt.Color.GREEN);
 watermark.setSize(Size.HALF_SIZE);

 PdfViewOptions pdfViewOptions = new PdfViewOptions();
 pdfViewOptions.setWatermark(watermark);

 try (Viewer viewer = new Viewer("document.docx")) {
     viewer.view(pdfViewOptions);
     // Use the viewer object for further operations
 }
 

Fields

Field Description
DIAGONAL The diagonal position.
TOP_LEFT The top left position.
TOP_CENTER The top center position.
TOP_RIGHT The top right position.
BOTTOM_LEFT The bottom left position.
BOTTOM_CENTER The bottom center position.
BOTTOM_RIGHT The bottom right position.

Methods

Method Description
values()
valueOf(String name)

DIAGONAL

public static final Position DIAGONAL

The diagonal position. This position represents a diagonal alignment or placement.

TOP_LEFT

public static final Position TOP_LEFT

The top left position. This position represents the top left corner alignment or placement.

TOP_CENTER

public static final Position TOP_CENTER

The top center position. This position represents the top center alignment or placement.

TOP_RIGHT

public static final Position TOP_RIGHT

The top right position. This position represents the top right corner alignment or placement.

BOTTOM_LEFT

public static final Position BOTTOM_LEFT

The bottom left position. This position represents the bottom left corner alignment or placement.

BOTTOM_CENTER

public static final Position BOTTOM_CENTER

The bottom center position. This position represents the bottom center alignment or placement.

BOTTOM_RIGHT

public static final Position BOTTOM_RIGHT

The bottom right position. This position represents the bottom right corner alignment or placement.

values()

public static Position[] values()

Returns: com.groupdocs.viewer.options.Position[]

valueOf(String name)

public static Position valueOf(String name)

Parameters:

Parameter Type Description
name java.lang.String

Returns: Position