IGxDocument.Stamps

Syntax

Stamps: IGxStamps;

Description

The Stamps property determines a set of marking stamps of the document.

Comments

To convert stamp text into the RTF format, use the ITextConverter.Export method.

Displaying conditions of marking stamps are given in IGxStamp.

TIP. To display marking stamp whatever mandatory access or access be security levels is applied, set the IMetabasePolicy.AlwaysPrintDocumentLabel property to True.

Example

Executing the example requires a regular report with the REGULAR_REPORT identifier.Add links to the Metabase, Drawing system assemblies.

Sub UserProc;
Var 
    MB: IMetabase;
    MObj: IMetabaseObject;
    Doc: IGxDocument;
    Stamps: IGxStamps;
    Stamp: IGxStamp;
Begin
    // Get metabase object
    MB := MetabaseClass.Active; 
    // Get regular report
    MObj := MB.ItemById("REGULAR_REPORT").Edit;
    // Cast obtained object to IGxDocument 
    Doc := MObj As IGxDocument;
    // Get collection of report stamps
    Stamps := Doc.Stamps;
    // Set up marking stamp displayed bottom left
    Stamp := stamps.LeftBottom;
    // Set stamp position on the first page 
    Stamp.Appearance := GxStampAppearance.FirstPage;
    // Set offset 30 mm to the left and 20 mm from the top
    Stamp.Offset := New GxSizeF.Create(3020);  
    // Set size 40x30 mm
    Stamp.Size := New GxSizeF.Create(4030);  
    // Set stamp text
    Stamp.Rtf := "{\rtf1\ansi\ansicpg1251\deff0\deflang1049{\fonttbl{\f0\fnil\fcharset240 Cambria;}}\viewkind4\uc1\pard\sa200\sl276\slmult1\lang9\b\f0\fs22 Page: &[Page] of &[Pages] \par}";
    MObj.Save;
End Sub UserProc;

After executing the example the bottom left marking stamp, which is displayed on report export or print, is set for the report. The marking stamp displays page number from the total number of pages. Displaying conditions of marking stamps are given in IGxStamp.

See also:

IGxDocument