PDFWatermark object

PDFWatermark is one of the PDF Builder objects and is derived from PDFModel. It sets or gets watermark for a PDF document.

To view the full hierarchy of the PDF Builder objects, find "pdfobject" in the Browser, right-click the object, and then select "Show Hierarchy” in the pop-up menu.

Notes when working with PDFWatermark

  • You can only add one watermark, and only add one type of watermark (image or text) to a PDF document.

  • It is unsupported to add watermark to PDF 2.0, PDF/A, PDF/UA, PDF/X, or PDF/VT documents.

Properties

PDFWatermark provides the following properties. In addition, it inherits the properties from its parent, PDFModel.

PDFWatermark property

Datatype

Description

ClassDefinition

PowerObject

An object of type PowerObject containing information about the class definition of the object or control.

Image

PDFImage

Sets or gets an image watermark.

Transparency

Real

Sets or gets the transparency of the watermark. The unit is percentage. If the value is 100, it means that the watermark is transparent. If the value is 0, it means that the watermark is opaque.

Rotate

Real

Sets or gets the rotation angle of the watermark.

Scale

Real

Sets or gets the scale of the watermark. A value of 0 or <0 means no scaling (the original size). A value of 100 (percentage) means scaling the watermark (text or image) until it fits just inside the borders of the current page. A value of 0~100 or >100 means the percentage of scaling based on the size of the watermark shown at the value of 100.

Text

PDFText

Sets or gets a text watermark.


Events

PDFWatermark event

Occurs

Constructor

Immediately before the Open event occurs in the window.

Destructor

Immediately after the Close event occurs in the window.


Functions

PDFWatermark provides the following functions.

PDFWatermark function

Datatype returned

Description

ClassName

String

Returns the name assigned to the object.

GetContextService

Integer

Creates a reference to a context-specific instance of the specified service.

GetParent

PowerObject

Returns a reference to the name of the parent object.

PostEvent

Boolean

Adds an event to the end of the message queue for the control.

TriggerEvent

Integer

Triggers a specified event in the control and executes the script for the event.

TypeOf

Object

Returns the type of the control.