Page 1 of 1

Multiple watermark additions using the api

Posted: Fri Apr 13, 2018 10:55 am
by rahulmr
Hi,

I am using the PXCComLib.CPXCControlEx to create a printer object using windev and was trying to apply watermarks to that. I was able to
add the watermark but it was working only for single watermark.
The following is the code snippet. It works for a single watermark but multiple watermarks cannot be added.When used as single watermarks both works.

gPrinter is a dynamic object in windev which refers to the printer created using

gPrinter = gFactory>>Printer("", "PDF-XChange Test", "", "")

gPrinter>>Option("Watermarks.Enabled")=True
gPrinter>>AddTextWatermark("WM", "HelloWaterMark 0", "Verdana", 400, True, False,0, 0, 0, 8, 100,100,0,100,30,0,"1,2")
gPrinter>>AddTextWatermark("WM1", "Hello WaterMark 1", "Verdana", 400, True, False,0, 0, 0, 1, 0,0,45,100,30,0,"1,2")

I tried setting using these two options

gPrinter>>Option("Watermarks.Watermarks")="WM,WM1"
gPrinter>>Option("Watermarks.Watermarks","WM,WM1")

I am not quite sure about the details what is given in PDF manual in sections watermark

"Watermarks String A comma to separate the list of watermark names should be added to the document.Each of these watermark should be added using AddTextWatermark or AddImageWatermark methods.Default value: empty string."

Re: Multiple watermark additions using the api

Posted: Mon Apr 16, 2018 6:32 am
by rahulmr
it works when you add ; and not , (semicolon instead of comma

Re: Multiple watermark additions using the api

Posted: Mon Apr 16, 2018 10:01 am
by Tracker Supp-Stefan
Hello rahulmr,

Thanks for pointing the right syntax. As discussed over e-mails - I will pass this along to the people working on the Manuals so that it can be updated there too!

Regards,
Stefan

Re: Multiple watermark additions using the api

Posted: Mon Apr 16, 2018 5:27 pm
by Sean - Tracker
Hi rahulmr,

Thank you for pointing out the error in the manual - we have updated it now. If you have experience any issues similar to this in the future, then it may be worth checking the V5 (2012) and V6 manuals in order to cross-reference. Those manuals are available at these locations:

https://help.pdf-xchange.com/DEV/d ... n=drivers5

https://help.pdf-xchange.com/pdfxdapi6/

Sorry that you experienced this issue - please also don't hesitate to get in touch if you need assistance in the future, we are always here to help.

Sean Godley

Tracker Software Products, North America Office