f



Question about using PSWaterMark from PageScript library.

Hi,

I�ve been using the PageScript library for xHarbour for years. At some point 
I will be switching to an alternative, because PageScript is not supported 
anymore. At this moment however, I would like to start using the Watermark 
in PageScript, through the PSWaterMark function. I have no clue how to make 
this work. There was just a little example provided with PageScript, and it 
did not generate a Watermark. Does anybody know how to trigger the 
Watermark? Thanks in advance.

Kind regards,

Gerard 

0
Gerard
11/24/2016 7:09:04 PM
comp.lang.xharbour 5470 articles. 0 followers. Post Follow

3 Replies
76 Views

Similar Articles

[PageSpeed] 55

Hi,

I do it this way

....
Wasserzeichen(220,15,"Duplikat bleibt im 
Haus",,,"ARIAL",0,60,RGB(190,190,190),,45)
Wasserzeichen(Nil)
.....


FUNCTION 
Wasserzeichen(r1,c1,cStr,cPicture,nJustify,cFont,nPoint,nStyle,nFColor,nBColor,nAngle,lForeGround)
LOCAL bDruck
DEFAULT lForeGround TO .f.
IF r1 == NIL
   PsWaterMark(NIL,NIL)
ELSE
   bDruck := 
{||PSTextOut(r1,c1,cStr,cPicture,nJustify,cFont,nPoint,nStyle,nFColor,nBColor,nAngle)}
   PsWaterMark(bDruck,lForeGround)
ENDIF
RETURN NIL


Michael Hagl





"Gerard de Vries" <codgy63@yahoo.com> schrieb im Newsbeitrag 
news:58373aab$0$1786$e4fe514c@news.kpn.nl...
> Hi,
>
> I�ve been using the PageScript library for xHarbour for years. At some 
> point I will be switching to an alternative, because PageScript is not 
> supported anymore. At this moment however, I would like to start using the 
> Watermark in PageScript, through the PSWaterMark function. I have no clue 
> how to make this work. There was just a little example provided with 
> PageScript, and it did not generate a Watermark. Does anybody know how to 
> trigger the Watermark? Thanks in advance.
>
> Kind regards,
>
> Gerard 


0
Michael
11/28/2016 7:38:58 AM
Hi Michael,

Thanks! I will give it a try. Just for me to understand it better, the 
Watermark is something you have to trigger yourself? Or is it automatically 
triggered with every new page?

Kind regards,

Gerard

"Michael Hagl"  schreef in bericht news:ea2584F4gvrU1@mid.individual.net...

Hi,

I do it this way

....
Wasserzeichen(220,15,"Duplikat bleibt im
Haus",,,"ARIAL",0,60,RGB(190,190,190),,45)
Wasserzeichen(Nil)
.....


FUNCTION
Wasserzeichen(r1,c1,cStr,cPicture,nJustify,cFont,nPoint,nStyle,nFColor,nBColor,nAngle,lForeGround)
LOCAL bDruck
DEFAULT lForeGround TO .f.
IF r1 == NIL
   PsWaterMark(NIL,NIL)
ELSE
   bDruck :=
{||PSTextOut(r1,c1,cStr,cPicture,nJustify,cFont,nPoint,nStyle,nFColor,nBColor,nAngle)}
   PsWaterMark(bDruck,lForeGround)
ENDIF
RETURN NIL


Michael Hagl





"Gerard de Vries" <codgy63@yahoo.com> schrieb im Newsbeitrag
news:58373aab$0$1786$e4fe514c@news.kpn.nl...
> Hi,
>
> I�ve been using the PageScript library for xHarbour for years. At some 
> point I will be switching to an alternative, because PageScript is not 
> supported anymore. At this moment however, I would like to start using the 
> Watermark in PageScript, through the PSWaterMark function. I have no clue 
> how to make this work. There was just a little example provided with 
> PageScript, and it did not generate a Watermark. Does anybody know how to 
> trigger the Watermark? Thanks in advance.
>
> Kind regards,
>
> Gerard

0
Gerard
11/30/2016 6:50:37 AM
Hi Gerard,

you have to call PsWatermark() before you call PsBeginDoc.

Have a look at tpscript.prg in Pagescript directory. There you can see this.

Sorry, I forgot to say.

********************************************************************************
PSWaterMark()
Syntax
Function PSWaterMark(bWaterMark, lMaterMark)

TPageScript:WaterMark(bWaterMark, lMaterMark)

Returns
An array containing the old watermark settings.

Description
PSWaterMark() accepts a codeblock that points to a User Defined Function. 
You put the code that prints the WaterMark in this function. You have the 
choice to print the WaterMark in the background or the foreground of each 
page.

Arguments
      bWaterMark The codeblock to call each time a WaterMark is to be 
printed.
      lForeGround Indicates if the WaterMark is printed in the ForeGround 
(TRUE) or BackGround (FALSE) of each page.

***************************************************************************************************************************************************************************


"Gerard de Vries" <codgy63@yahoo.com> schrieb im Newsbeitrag 
news:583e7695$0$1766$e4fe514c@news.kpn.nl...
> Hi Michael,
>
> Thanks! I will give it a try. Just for me to understand it better, the 
> Watermark is something you have to trigger yourself? Or is it 
> automatically triggered with every new page?
>
> Kind regards,
>
> Gerard
>
> "Michael Hagl"  schreef in bericht 
> news:ea2584F4gvrU1@mid.individual.net...
>
> Hi,
>
> I do it this way
>
> ...
> Wasserzeichen(220,15,"Duplikat bleibt im
> Haus",,,"ARIAL",0,60,RGB(190,190,190),,45)
> Wasserzeichen(Nil)
> ....
>
>
> FUNCTION
> Wasserzeichen(r1,c1,cStr,cPicture,nJustify,cFont,nPoint,nStyle,nFColor,nBColor,nAngle,lForeGround)
> LOCAL bDruck
> DEFAULT lForeGround TO .f.
> IF r1 == NIL
>   PsWaterMark(NIL,NIL)
> ELSE
>   bDruck :=
> {||PSTextOut(r1,c1,cStr,cPicture,nJustify,cFont,nPoint,nStyle,nFColor,nBColor,nAngle)}
>   PsWaterMark(bDruck,lForeGround)
> ENDIF
> RETURN NIL
>
>
> Michael Hagl
>
>
>
>
>
> "Gerard de Vries" <codgy63@yahoo.com> schrieb im Newsbeitrag
> news:58373aab$0$1786$e4fe514c@news.kpn.nl...
>> Hi,
>>
>> I�ve been using the PageScript library for xHarbour for years. At some 
>> point I will be switching to an alternative, because PageScript is not 
>> supported anymore. At this moment however, I would like to start using 
>> the Watermark in PageScript, through the PSWaterMark function. I have no 
>> clue how to make this work. There was just a little example provided with 
>> PageScript, and it did not generate a Watermark. Does anybody know how to 
>> trigger the Watermark? Thanks in advance.
>>
>> Kind regards,
>>
>> Gerard
> 


0
Michael
11/30/2016 11:14:39 AM
Reply: