pdfGetWordText

Get the text of a word.
char *pdfGetWordText(PDFWordHandle word, int *length)
This function returns the text of a word (whose handle was obtained with pdfGetWord).

A string is returned, and *length is filled in with the string length. The string will be zero-terminated, but it may contain zero bytes, depending on the current text encoding (see pdfSetTextEncoding). The caller is responsible for freeing the string with the pdfFreeMemory function.

C:
PDFWordHandle word; char *text; int length; pdfBuildWordList(pdf, 1); for (i = 0; i < pdfGetNumWords(pdf); ++i) { word = pdfGetWord(pdf, i); text = pdfGetWordText(word, &length); printf("%s\n", text); pdfFreeMemory(text); }
pdfBuildWordList
pdfGetNumWords
pdfGetWord
pdfGetWordLength
pdfGetWordFontName
pdfGetWordColor
pdfGetWordBox
pdfGetWordBox2
pdfGetWordCharBox
pdfGetWordCharBox2
pdfGetWordFontSize
pdfGetWordFontIsFixedWidth
pdfGetWordFontIsSerif
pdfGetWordFontIsSymbolic
pdfGetWordFontIsItalic
pdfGetWordFontIsBold
pdfGetWordRotation
pdfGetWordCharPos
pdfGetWordCharLen