Multiple watermark additions using the api

PDF-XChange Drivers API (only) V4/V5
This Forum is for the use of Software Developers requiring help and assistance for Tracker Software's PDF-XChange Printer Drivers SDK (only) - VERSION 4 & 5 - Please use the PDF-Tools SDK Forum for Library DLL assistance.

Moderators: TrackerSupp-Daniel, Tracker Support, Vasyl-Tracker Dev Team, Chris - Tracker Supp, Sean - Tracker, Tracker Supp-Stefan

Post Reply
rahulmr
User
Posts: 3
Joined: Fri Apr 13, 2018 10:52 am

Multiple watermark additions using the api

Post 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."
rahulmr
User
Posts: 3
Joined: Fri Apr 13, 2018 10:52 am

Re: Multiple watermark additions using the api

Post by rahulmr »

it works when you add ; and not , (semicolon instead of comma
User avatar
Tracker Supp-Stefan
Site Admin
Posts: 17765
Joined: Mon Jan 12, 2009 8:07 am
Location: London
Contact:

Re: Multiple watermark additions using the api

Post 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
User avatar
Sean - Tracker
Site Admin
Posts: 175
Joined: Wed Sep 14, 2016 5:42 pm
Location: British Columbia

Re: Multiple watermark additions using the api

Post 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
Sean Godley
Technical Writer
Tracker Software Products (Canada) LTD
Sales: +1 (250) 324-1621
Fax: +1 (250) 324-1623
Post Reply