pdfGetAnnotType

Get the type of an annotation.
char *pdfGetAnnotType(PDFAnnotHandle annot)
This function returns the type of an annotation (whose handle was obtained with pdfOnAnnot). The type string is one of the annotation types defined in the PDF spec.

The returned string should not be modified or freed.

C:
void mouseDownCbk(void *data, int button, int shift, int page, double x, double y) { PDFAnnotHandle annot; char *type, *content; int contentLength; annot = pdfOnAnnot(viewer, page, x, y); type = pdfGetAnnotType(annot); if (!strcmp(type, "Text")) { content = pdfGetAnnotContent(annot, &contentLength); /* ... display the popup text annotation content ... */ pdfFreeMemory(content); } }
pdfOnAnnot
pdfGetAnnotContent