com.qoppa.pdf
Interface IWatermark


public interface IWatermark

This interface is used to display a watermark on a PDF document in the following Java PDF Libraries:

There are 3 types of watermark callbacks: images, print, and viewer. The type of watermark callback is dependent on the Java PDF Library. For additional information, see the specific library API.

Author:
Qoppa Software

Field Summary
static int TYPE_IMAGES
          The watermark type used when creating images from a PDF document.
static int TYPE_PRINT
          The watermark type used when printing a PDF document.
static int TYPE_VIEWER
          The watermark type used when viewing a PDF document.
 
Method Summary
 void drawWatermark(Graphics2D g, int type, int pageIndex, int pageWidth, int pageHeight)
          This method is called by the Java PDF Library to draw a watermark on a PDF document.
 

Field Detail

TYPE_IMAGES

static final int TYPE_IMAGES
The watermark type used when creating images from a PDF document.

See Also:
Constant Field Values

TYPE_PRINT

static final int TYPE_PRINT
The watermark type used when printing a PDF document.

See Also:
Constant Field Values

TYPE_VIEWER

static final int TYPE_VIEWER
The watermark type used when viewing a PDF document.

See Also:
Constant Field Values
Method Detail

drawWatermark

void drawWatermark(Graphics2D g,
                   int type,
                   int pageIndex,
                   int pageWidth,
                   int pageHeight)
This method is called by the Java PDF Library to draw a watermark on a PDF document.

Parameters:
g - the Graphics2D object used to draw the watermark
type - a type defined in this class, either TYPE_IMAGES, TYPE_PRINT, or TYPE_VIEWER
pageIndex - the current page index being rendered
pageWidth - the page width being rendered
pageHeight - the page height being rendered