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

WatermarkText Property

Gets/Sets text that will appear as a watermark on PDF file.

string get_WatermarkText(int Index)
void set_WatermarkText(int Index, string value)




Function get_WatermarkText(Index As Integer) As String
Sub set_WatermarkText(Index As Integer, value As String)




def getWatermarkText(self, Index)
def setWatermarkText(self, Index, value)




String getWatermarkText(int Index) throws PrinterException
void setWatermarkText(int Index, String value) throws PrinterException




function getWatermarkText($Index) 
function setWatermarkText($Index, $value) 




BclPrnResult GetWatermarkText(BclPrinter* pPrinter,
                              int Index,
                              wchar_t** poutVal);
BclPrnResult SetWatermarkText(BclPrinter* pPrinter,
                              int Index,
                              const wchar_t* newVal);
Property WatermarkText(Index As Long) As String





bepprint +Watermark -text <string>





Type:

String

Parameters

Remarks

Special feature 1:
You can have multiple text lines by inserting CRLF ("\r\n" for C++, and vbCr + vbLf for Visual Basic) in between.

Special feature 2:
You can have page number by inserting "%p" (e.g., "Page %p").

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"