BCL easyPDF SDK
easyPDF SDK Usermanual
PDF Creator Programming API  |  Download Free Trial  |  Contact Us to Purchase

WatermarkColor Property

Gets/Sets watermark text color.

Property WatermarkColor(Index As Long) As OLE_COLOR

System.UInt32 get_WatermarkColor(int Index)
void set_WatermarkColor(int Index, System.UInt32 value)

int getWatermarkColor(int Index) throws PrinterException
void setWatermarkColor(int Index, int value) throws PrinterException

Type

OLE_COLOR

Parameters

Remarks

Note: OLE_COLOR conversion from various programming languages:

C++:

static_cast<OLE_COLOR>(RGB(0, 0, 255))

VB6:

RGB(0, 0, 255)

VB.NET:

Convert.ToUInt32(System.Drawing.ColorTranslator.ToOle(Color.FromArgb(0, 0, 255))

C#:

(uint)System.Drawing.ColorTranslator.ToOle(Color.FromArgb(0, 0, 255))

Others:

red + green * 256 + blue * 65536 (32 bit integer value in following format: 0x00bbggrr)


For more information about color translation, refer to MSDN Knowledge Base article Q131101.

Example Usage

Set oPrinter = CreateObject("easyPDF.Printer.8")
Set oPrintJob = oPrinter.PrintJob
Set oPDFSetting = oPrintJob.PDFSetting

oPDFSetting.Watermark(0) = True
oPDFSetting.WatermarkAngle(0) = 60
oPDFSetting.WatermarkColor(0) = RGB(128, 128, 128)
oPDFSetting.WatermarkFirstPageOnly(0) = True
oPDFSetting.WatermarkFontName(0) = "Arial"
oPDFSetting.WatermarkFontSize(0) = 72
oPDFSetting.WatermarkOutlineOnly(0) = True
oPDFSetting.WatermarkText(0) = "SDK Sample"
oPDFSetting.WatermarkZOrder(0) = PRN_WMARK_ZORDER_TOP

oPrintJob.PrintOut "C:\test\input.doc", "C:\test\output.pdf"