|
BeginWaterMark procedure (TgtCustomDocumentEngine) |
Top |
|
procedure BeginWaterMark; override;
Description This method is invoked to begin Watermark. Specify the text and graphic elements that should be drawn on behind of the contents of each page of the document within a BeginWaterMark, EndWaterMark block. The BeginWaterMark, EndWaterMark block needs to be coded only once for each document regardless of the number of pages it contains. You can code the block immediately after calling BeginDoc. You can also change the Watermark from a particular page of a document: just handle the OnAfterBeginPage event and use the CurrentPage property for coding the new Watermark at the required page. From that point on in the document all pages will contain the new Watermark.
Example:
Delphi:
with gtPDFEngine do begin BeginWatermark; //...Set Font and Brush as required TextOut(3, 4, 'This is a sample watermark text'); //...Set image properties as required DrawImage(0, 0, Image1.Picture.Graphic); EndWatermark; end;
C++Builder:
gtPDFEngine1->BeginWaterMark(); gtPDFEngine1->TextOut(3, 4, "This is a sample watermark text"); gtPDFEngine1->DrawImage(0, 0, Image1->Picture->Graphic); gtPDFEngine1->EndWaterMark(); |