eDocEngine VCL Professional Help » Symbol Reference » Namespaces of Helper Classes » gtExPDFEng Namespace » TgtPDFTextAnnot Class
Gnostice eDocEngine VCL Developer Guide
|
This class represents a text annotation.
public TgtPDFTextAnnot = class(TgtPDFAnnot);
public: class TgtPDFTextAnnot : public TgtPDFAnnot;
A text annotation is identified by an icon. When the user clicks the icon, the viewer application displays the annotation's popup window.
gtExPDFEng
procedure TForm1.Demo_TgtPDFTextAnnotation; var gtPDFTextAnnot1: TgtPDFTextAnnot; gtPDFEngine1: TgtPDFEngine; begin gtPDFEngine1 := TgtPDFEngine.Create(Nil); // Create a text annotation gtPDFTextAnnot1 := TgtPDFTextAnnot.Create; gtPDFTextAnnot1.Rect := gtRect(1, 1, 3, 2); gtPDFTextAnnot1.Name := tnNote; gtPDFTextAnnot1.Open := True; gtPDFTextAnnot1.BorderColor := clRed; gtPDFTextAnnot1.Contents := 'This is a note.'; gtPDFTextAnnot1.Subject := 'Review by John Doe'; gtPDFTextAnnot1.Title := 'Sample Doc'; with gtPDFEngine1 do begin Preferences.ShowSetupDialog := False; Preferences.OpenAfterCreate := True; FileName := 'text_annotation.pdf'; BeginDoc; // Create a PDF document Rectangle(1, 1, 3, 2, False); TextOut(1, 0.8, 'What is this?'); // Add the annotation to the current page AddAnnotItem(gtPDFTextAnnot1); EndDoc; // Save the PDF document end; end;
|
Name |
Description |
![]() |
Specifies border color of the annotation. | |
![]() |
Specifies text that needs to be used as the contents of the annotation's popup window. | |
![]() |
Specifies icon used to display the annotation. | |
![]() |
Specifies whether the popup window of the annotation need to be open by default on viewer applications. | |
![]() |
Specifies the location of the annotation on its page. | |
![]() |
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. |