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

WatermarkHOffset Property

Gets/Sets watermark horizontal placement offset.

double get_WatermarkHOffset(int Index)
void set_WatermarkHOffset(int Index, double value)

Function get_WatermarkHOffset(Index As Integer) As Double
Sub set_WatermarkHOffset(Index As Integer, value As Double)

def getWatermarkHOffset(self, Index)
def setWatermarkHOffset(self, Index, value)

double getWatermarkHOffset(int Index) throws PrinterException
void setWatermarkHOffset(int Index, double value) throws PrinterException

function getWatermarkHOffset($Index) 
function setWatermarkHOffset($Index, $value) 

BclPrnResult GetWatermarkHOffset(BclPrinter* pPrinter,
                                 int Index,
                                 double* poutVal);
BclPrnResult SetWatermarkHOffset(BclPrinter* pPrinter,
                                 int Index,
                                 double newVal);
Property WatermarkHOffset(Index As Long) As Double

bepprint +Watermark -left <dimension> |
                    -right <dimension> |
                    -hcenter [<dimension>]


Double (inches)



The value specified in WatermarkHPostion and WatermarkVPosition becomes the origin (0, 0).

Example Usage

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

oPDFSetting.Watermark(0) = True
oPDFSetting.WatermarkAngle(0) = 0
oPDFSetting.WatermarkFontSize(0) = 72

' place the text (two lines, center aligned)
' at 0.5 inch from the top-left corner

oPDFSetting.WatermarkText(0) = "SDK Sample" + vbCr + vbLf + "2nd Line"
oPDFSetting.WatermarkHPosition(0) = PRN_WMARK_HPOS_LEFT
oPDFSetting.WatermarkVPosition(0) = PRN_WMARK_VPOS_TOP
oPDFSetting.WatermarkTextAlignment(0) = PRN_WMARK_ALIGN_CENTER
oPDFSetting.WatermarkHOffset(0) = 0.5
oPDFSetting.WatermarkVOffset(0) = 0.5

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