pdfGetWordCharLen

Get the character length of a word.
int pdfGetWordCharLen(PDFWordHandle word)
XpdfText tracks the "character position", where character position i refers to the ith character drawn in the PDF content stream. The pdfGetWordCharLen function returns the number of content stream characters in the word.

(The length returned by pdfGetWordCharLen may be different from both the length of the string returned by pdfGetWordText and the value returned by pdfGetWordLength, depending on the PDF font encoding and the current text encoding.)

The pdfGetWordCharPos and pdfGetWordCharLen functions are primarily useful when generating or working with highlight files.

C:
int charPos, charLen; charPos = pdfGetWordCharPos(word); charLen = pdfGetWordCharLen(word);
pdfBuildWordList
pdfGetNumWords
pdfGetWord
pdfGetWordText
pdfGetWordLength
pdfGetWordFontName
pdfGetWordColor
pdfGetWordBox
pdfGetWordBox2
pdfGetWordCharBox
pdfGetWordCharBox2
pdfGetWordFontSize
pdfGetWordFontIsFixedWidth
pdfGetWordFontIsSerif
pdfGetWordFontIsSymbolic
pdfGetWordFontIsBold
pdfGetWordFontIsItalic
pdfGetWordRotation
pdfGetWordCharPos