Position
Leave feedback
On this page
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
}
| 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. |
| Method | Description |
|---|---|
| values() | |
| valueOf(String name) |
public static final Position DIAGONAL
The diagonal position. This position represents a diagonal alignment or placement.
public static final Position TOP_LEFT
The top left position. This position represents the top left corner alignment or placement.
public static final Position TOP_CENTER
The top center position. This position represents the top center alignment or placement.
public static final Position TOP_RIGHT
The top right position. This position represents the top right corner alignment or placement.
public static final Position BOTTOM_LEFT
The bottom left position. This position represents the bottom left corner alignment or placement.
public static final Position BOTTOM_CENTER
The bottom center position. This position represents the bottom center alignment or placement.
public static final Position BOTTOM_RIGHT
The bottom right position. This position represents the bottom right corner alignment or placement.
public static Position[] values()
Returns: com.groupdocs.viewer.options.Position[]
public static Position valueOf(String name)
Parameters:
| Parameter | Type | Description |
|---|---|---|
| name | java.lang.String |
Returns: Position
Was this page helpful?
Any additional feedback you'd like to share with us?
Please tell us how we can improve this page.
Thank you for your feedback!
We value your opinion. Your feedback will help us improve our documentation.