This content has been marked as final. Show 10 replies
I am having trouble getting the dynamic watermark to work correctly
The code i am using is:
So i basically want to show the text "sample" as a watermark (I will add an if statement later on which I know how to do)
I then in the format -> background -> printed watermark menu, select the "text watermark" radio button
In the text field I enter <?$test?>
This does not work
I have also tried inserting the set variable code in a form field and this does not work. I have also tried <?test?> (instead of <?$test?>
I am running Word 2003
Can you provide any assistance? Thanks in advance - Simon
I have tried inserting the get_variable into the format -> background -> printed watermark menu but it still did not work
I have emailed my RTF template to you at the address firstname.lastname@example.org (if this is not correct, please advise. The email is from Simon Tropeano, Attachment = Watermark.rtf)
The watermark should simply be "tttt"
Could you advise please? Thank you
Ok here is my revised logic
Get environment value from xml
<?xdoxslt:set_variable($_XDOCTX, ‘Environment', /R5643500/Properties/Environment)?>
Initialise Flag to 2
<?xdoxslt:set_variable($_XDOCTX, ‘Flag’, ‘2’)?>
If environment contains PD900, then set a variable called Flag to true(1). No display happens here at all
<?if:contains((xdoxslt:get_variable($_XDOCTX, 'Environment')),'PD900')?> <?xdoxslt:set_variable($_XDOCTX, ‘Flag', ‘1’)?>
If the flag is not true, it means it doesn’t contain PD900 and is therefore a test environment. I place the below line into menu format -> background -> printed watermark - > text watermark -> text field. Then set font and size.
<?if:not(xdoxslt:get_variable($_XDOCTX, 'Flag')) = '1'?>SAMPLE<?end if?>
It seems that it prints the SAMPLE watermark when the above line is both true and false so it looks like it is not evaluating the if properly. Any ideas anyone?