PDF Creator Pilot documentation |
Download CHM version of this manual. |
|
![]() ![]() Collapse AllThis function creates a color information annotation on the current PDF page.
|
| LONG PDFPAGE_SetAnnotation ( DOUBLE left, DOUBLE top, DOUBLE right, DOUBLE bottom, BSTR title, BSTR contents, OLE_COLOR color, VARIANT_BOOL print, VARIANT_BOOL noZoom, VARIANT_BOOL noRotate, VARIANT_BOOL invisible, VARIANT_BOOL hidden, VARIANT_BOOL noView, VARIANT_BOOL readOnly, VARIANT_BOOL opened, TxFontCharset fontCharset ) |
Parameters
left
X coordinate of the left-top corner of the bounding rectangle.
top
Y coordinate of the left-top corner of the bounding rectangle.
right
X coordinate of the right-bottom corner of the bounding rectangle.
bottom
Y coordinate of the right-bottom corner of the bounding rectangle.
title
Annotation title.
contents
Annotation contents.
color
Annotation background color.
print
Is the annotation printed with the page.
noZoom
Is the annotation not zoomed with the page.
noRotate
Is the annotation not rotated with the page.
invisible
Is the annotation invisible.
hidden
Is the annotation hidden.
noView
NoView flag.
readOnly
Is the annotation read only.
opened
Is the annotation opened.
fontCharset
Annotation's character set.
Return value
Annotation index.
Remarks
PDFPAGE_SetAnnotation inserts a text color annotation into the current page in the area bounded by the provided coordinates. The strings title and text set the title and content of the annotation. color specifies the color of the annotation icon and borders. Additional flags can describe annotation window characteristics, like visibility, zoom, read-only, print and rotate allowing (AnnotationFlag_afPrint, AnnotationFlag_afNoZoom, AnnotationFlag_afNoRotate, AnnotationFlag_afInvisible, AnnotationFlag_afHidden, AnnotationFlag_afNoView, AnnotationFlag_afReadOnly). The opened parameter creates an annotation opened at startup. fontCharset specifies the code page for annotation text. OLE_COLOR type contains the value of any RGB color.
The return value is an annotation/control identifier in document's annotations collection and can be used in AddControlToAction, CurrentAnnotationIndex.
Example
Creating text annotation
Delphi
[copy to clipboard]
{ PDF object is supposed to be created }
PDF.BeginDoc;
PDF.PDFPAGE_SetAnnotation(100, 200, 110, 210, 'Title', 'Here goes annotation contents...', 255, false, false, false, false, false, false, true, true, charsetANSI_CHARSET);
PDF.EndDoc;
C/C++
[copy to clipboard]
// PDF object is supposed to be created PDF->BeginDoc(); PDF->PDFPAGE_SetAnnotation(100, 200, 110, 210, "Title", "Here goes annotation contents...", 255, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, TRUE, TRUE, charsetANSI_CHARSET); PDF->EndDoc();
C#
[copy to clipboard]
// PDF object is supposed to be created PDF.BeginDoc(); PDF.PDFPAGE_SetAnnotation(100, 200, 110, 210, "Title", "Here goes annotation contents...", 255, false, false, false, false, false, false, true, true, TxFontCharset.charsetANSI_CHARSET); PDF.EndDoc();
Visual Basic
[copy to clipboard]
' PDF object is supposed to be created PDF.BeginDoc PDF.PDFPAGE_SetAnnotation 100, 200, 110, 210, "Title", "Here goes annotation contents...", 255, false, false, false, false, false, false, true, true, 0 PDF.EndDoc
See Also


