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

WatermarkTextAlignment Property

Gets/Sets watermark text alignment setting.

Property WatermarkTextAlignment(Index As Long) As prnWmarkAlignment

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

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

Type

prnWmarkAlignment

Parameters

Remarks

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"