PDF Creator Pilot documentation |
Download CHM version of this manual. |
|
![]() ![]() Collapse AllThis method creates an information annotation on the current PDF page.
|
| LONG AddUnicodeTextAnnotation ( FLOAT x, FLOAT y, BSTR title, BSTR contents ) |
Parameters
x
X coordinate of the top-left corner of the bounding rectangle
y
Y coordinate of the top-left corner of the bounding rectangle
title
Title of the annotation
contents
Contents of the annotation
Return value
Remarks
This method inserts a colored text annotation into the current page in the area bounded by the specified coordinates. The strings title and content set the title and content of the annotation.
The return value is an annotation/control identifier in the document's annotations collection and can be used in AddControlToAction and CurrentAnnotation.
Example
Adding a Text Annotation
Delphi
[copy to clipboard]
{ PDF object is supposed to be created }
PDF.AddUnicodeTextAnnotation(10, 10, 'Title', 'Some text goes here...');
PDF.AnnotHidden := false;
PDF.TextAnnotIcon := aiKey;
PDF.AnnotInvisible := false;
PDF.AnnotLocked := true;
PDF.AnnotLockedContents := true;
PDF.AnnotNoRotate := true;
PDF.AnnotNoView := false;
PDF.AnnotNoZoom := true;
PDF.AnnotPrint := true;
PDF.AnnotReadOnly := true;
PDF.AnnotToggleNoView := false;
PDF.IsOpenedTextAnnot := true;
PDF.SaveToFile('test.pdf', true);
C/C++
[copy to clipboard]
// PDF object is supposed to be created
PDF->AddUnicodeTextAnnotation(10, 10, "Title", "Some text goes here...");
PDF->AnnotHidden = false;
PDF->TextAnnotIcon = aiKey;
PDF->AnnotInvisible = false;
PDF->AnnotLocked = true;
PDF->AnnotLockedContents = true;
PDF->AnnotNoRotate = true;
PDF->AnnotNoView = false;
PDF->AnnotNoZoom = true;
PDF->AnnotPrint = true;
PDF->AnnotReadOnly = true;
PDF->AnnotToggleNoView = false;
PDF->.IsOpenedTextAnnot = true;
PDF->SaveToFile("test.pdf", true);
C#
[copy to clipboard]
// PDF object is supposed to be created
PDF.AddUnicodeTextAnnotation(10, 10, "Title", "Some text goes here...");
PDF.AnnotHidden = false;
PDF.TextAnnotIcon = TextAnnotationIcon.aiKey;
PDF.AnnotInvisible = false;
PDF.AnnotLocked = true;
PDF.AnnotLockedContents = true;
PDF.AnnotNoRotate = true;
PDF.AnnotNoView = false;
PDF.AnnotNoZoom = true;
PDF.AnnotPrint = true;
PDF.AnnotReadOnly = true;
PDF.AnnotToggleNoView = false;
PDF.IsOpenedTextAnnot = true;
PDF.SaveToFile("test.pdf", true);
Visual Basic
[copy to clipboard]
' PDF object is supposed to be created PDF.AddUnicodeTextAnnotation 10, 10, "Title", "Some text goes here..." PDF.AnnotHidden = false PDF.TextAnnotIcon = 2 'TextAnnotationIcon.aiKey PDF.AnnotInvisible = false PDF.AnnotLocked = true PDF.AnnotLockedContents = true PDF.AnnotNoRotate = true PDF.AnnotNoView = false PDF.AnnotNoZoom = true PDF.AnnotPrint = true PDF.AnnotReadOnly = true PDF.AnnotToggleNoView = false PDF.IsOpenedTextAnnot = true PDF.SaveToFile "test.pdf", true
See Also
Reference


