pdfGetWordDirection
Get the writing direction of a word.
int pdfGetWordDirection(PDFWordHandle word)
This function returns the writing direction of a word (whose handle
was obtained with
pdfGetWord
). It will return +1 for
left-to-right scripts, -1 for right-to-left, and 0 for neither
(certain punctuation marks).
C:
PDFWordHandle word;
int primaryDir, wordDir;
/* make word list for page 1 */
pdfBuildWordList(pdf, 1);
/* get the primary writing direction for the page */
primaryDir = pdfGetPrimaryDirection();
for (i = 0; i < pdfGetNumWords(pdf); ++i) {
word = pdfGetWord(pdf, i);
wordDir = pdfGetWordDirection(word);
...
}