IPictureWatermark
The IPictureWatermark interface is used to configure the application of graphic watermarks to output file pages.
Properties
Defines the method of applying a watermark to document pages. It is both readable and writable.
Constant | Value | Description |
---|---|---|
WME_STAMP | 0 | Watermark is applied over the document |
WME_WATERMARK | 2 | Watermark is "mixed" in with the document |
WME_BACKGROUND | 3 | Watermark is placed underneath the document |
String ImgFilePath
Holds the path to the graphic file which will be applied to document pages as a watermark. It is both readable and writable.
Integer MarginsX
Defines watermark horizontal margins, i. e. offsets (in pixels) from the right and left edges of the page to be taken into account when placing the watermark. It is both readable and writable.
Integer MarginsY
Defines watermark vertical margins, i. e. offsets (in pixels) from the top and bottom edges of the page to be taken into account when placing the watermark. It is both readable and writable.
Enum PositionX
Defines watermark horizontal alignment on the pages of a document. It is both readable and writable.
Constant | Value | Description |
---|---|---|
POS_LEFT | 0xFFFFFFFF | Watermark is left-justified on page |
POS_CENTER | 0 | Watermark is centered on page |
POS_RIGHT | 1 | Watermark is right-justified on page |
Enum PositionY
Defines watermark vertical alignment on the pages of a document. It is both readable and writable.
Constant | Value | Description |
---|---|---|
POS_TOP | 0xFFFFFFFF | Watermark is aligned with the top of the page |
POS_CENTER | 0 | Watermark is vertically centered on page |
POS_BOTTOM | 1 | Watermark is aligned with the bottom of the page |
Enum Rotation
Defines watermark rotation angle on a page. It is both readable and writable.
Value | Description |
---|---|
-90 | Watermark is rotated 90 degrees counterclockwise |
-45 | Watermark is rotated 45 degrees counterclockwise |
0 | Watermark is not rotated. |
45 | Watermark is rotated 45 degrees clockwise |
90 | Watermark is rotated 90 degrees clockwise |
Boolean Stretch
Defines whether a watermark will be stretched to cover the entire page in a document. It is both readable and writable.
Value | Description |
---|---|
TRUE | Watermark will be stretched to cover entire page |
FALSE | Watermark will not be stretched |
Examples
Visual Basic 6
Dim objUDC As IUDC Dim itfPrinter As IUDCPrinter Dim itfProfile As IProfile Set objUDC = New UDC.APIWrapper Set itfPrinter = objUDC.Printers("Universal Document Converter") Set itfProfile = itfPrinter.Profile itfProfile.Watermark.Mode = WM_PICTURE itfProfile.Watermark.PictureWatermark.EmbossingMethod = WME_BACKGROUND itfProfile.Watermark.PictureWatermark.ImgFilePath = "C:\My stamp.png" itfProfile.Watermark.PictureWatermark.MarginsX = 0 itfProfile.Watermark.PictureWatermark.MarginsY = 0 itfProfile.Watermark.PictureWatermark.PositionX = POS_CENTER itfProfile.Watermark.PictureWatermark.PositionY = POS_CENTER itfProfile.Watermark.PictureWatermark.Rotation = 0 itfProfile.Watermark.PictureWatermark.Stretch = True