eDocEngine VCL Professional Help » Symbol Reference » Namespaces of Helper Classes » gtExPDFEng Namespace » TgtPDFStampAnnot Class

Gnostice eDocEngine VCL Developer Guide
TgtPDFStampAnnot Class

This class represents a rubber stamp annotation.

Pascal
public TgtPDFStampAnnot = class(TgtPDFAnnot);
C++
public: class TgtPDFStampAnnot : public TgtPDFAnnot;
Description

A rubber stamp annotation appears like a seal on a page. There are several rubber stamps available for different purposes.

gtExPDFEng

procedure TForm1.Demo_TgtPDFInkAnnot;
var
  gtPDFInkAnnot1: TgtPDFInkAnnot;
  arrVertices: Array [0 .. 4] of TgtPoint;
  i: Integer;
  gtPDFEngine1: TgtPDFEngine;
begin
  gtPDFEngine1 := TgtPDFEngine.Create(Nil);

  // Specify vertices for an ink annotation
  arrVertices[0].X := 100;
  arrVertices[0].Y := 100;
  arrVertices[1].X := 300;
  arrVertices[1].Y := 400;
  arrVertices[2].X := 500;
  arrVertices[2].Y := 300;
  arrVertices[3].X := 200;
  arrVertices[3].Y := 150;
  arrVertices[4].X := 600;
  arrVertices[4].Y := 450;

  // Create an ink annotation
  gtPDFInkAnnot1 := TgtPDFInkAnnot.Create;
  gtPDFInkAnnot1.SetInkPoints(arrVertices);
  gtPDFInkAnnot1.Contents := 'Looks like a free-hand scribble, doesn''t it?';
  gtPDFInkAnnot1.Title := 'Ink Annotation Demo';

  with gtPDFEngine1 do
  begin
    Preferences.ShowSetupDialog := False;
    Preferences.OpenAfterCreate := True;
    FileName := 'Output_Docs\ink_annotation.pdf';
    MeasurementUnit := muPixels;

    // Create a PDF document
    BeginDoc;
    Font.Size := 18;
    // Mark the vertices
    for i := 0 to 4 do
    begin
      TextOut(arrVertices[i].X, arrVertices[i].Y,
        'x (' + FloatToStr(arrVertices[i].X) + ', ' + FloatToStr
          (arrVertices[i].Y) + ')');
    end;
    // Add the ink annotation to the current page
    AddAnnotItem(gtPDFInkAnnot1);
    // Save the PDF document
    EndDoc;
  end;

end;
Properties
TgtPDFStampAnnot Class
 
Name 
Description 
 
Specifies border color of the annotation. 
 
Specifies text that needs to be used as the contents of the annotation's popup window. 
 
Rect 
Specifies the location of the annotation on its page. 
 
Specifies the rubber stamp that appears on the annotation. 
 
Specifies text that needs to be used as the subject in the annotation's popup window. 
 
Specifies text that needs to be used as the title in the annotation's popup window. 
Methods
TgtPDFStampAnnot Class
 
Name 
Description 
 
Creates a new instance of this class. 
 
Destroys this instance.