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

WatermarkTextAlignment Property

Gets/Sets watermark text alignment setting.

prnWmarkAlignment get_WatermarkTextAlignment(int Index)
void set_WatermarkTextAlignment(int Index, prnWmarkAlignment value)

Function get_WatermarkTextAlignment(Index As Integer) As prnWmarkAlignment
Sub set_WatermarkTextAlignment(Index As Integer, value As prnWmarkAlignment)

def getWatermarkTextAlignment(self, Index)
def setWatermarkTextAlignment(self, Index, value)

prnWmarkAlignment getWatermarkTextAlignment(int Index) throws PrinterException
void setWatermarkTextAlignment(int Index,
                               prnWmarkAlignment value) throws PrinterException

function getWatermarkTextAlignment($Index) 
function setWatermarkTextAlignment($Index, $value) 

BclPrnResult GetWatermarkTextAlignment(BclPrinter* pPrinter,
                                       int Index,
                                       BclPrnWmarkAlignment* poutVal);
BclPrnResult SetWatermarkTextAlignment(BclPrinter* pPrinter,
                                       int Index,
                                       BclPrnWmarkAlignment newVal);
Property WatermarkTextAlignment(Index As Long) As prnWmarkAlignment

bepprint +Watermark -align left|right|center





When there are multiple lines in the watermark text (separated by CRLF), you can use this property to specify how the text should be aligned.

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"