pdfGetWordBox2
Get the bounding box of a word.
void pdfGetWordBox2(PDFHandle pdf, PDFWordHandle word,
double *xMin, double *yMin, double *xMax, double *yMax)
This function returns the bounding box of a word (whose handle was obtained
with
pdfGetWord
).
The xMin
, yMin
, xMax
,
and yMax
coordinates are in PDF coordinate space.
This function is identical to pdfGetWordBox
except that it returns
points in PDF coordinate space.
C:
PDFWordHandle word;
char *fontName;
double fontSize;
int bold, italic, fixedWidth, serif, symbolic;
double r, g, b;
double xMin, yMin, xMax, yMax;
int rot;
pdfBuildWordList(pdf, 1);
for (i = 0; i < pdfGetNumWords(pdf); ++i) {
word = pdfGetWord(pdf, i);
fontName = pdfGetWordFontName(word);
fontSize = pdfGetWordFontSize(word);
bold = pdfGetWordFontIsBold(word);
italic = pdfGetWordFontIsItalic(word);
fixedWidth = pdfGetWordFontIsFixedWidth(word);
serif = pdfGetWordFontIsSerif(word);
symbolic = pdfGetWordFontIsSymbolic(word);
pdfGetWordColor(word, &r, &g, &b);
pdfGetWordBox2(pdf, word, &xMin, &yMin, &xMax, &yMax);
rot = pdfGetWordRotation(word);
...
}
pdfGetWordBox
pdfBuildWordList
pdfGetNumWords
pdfGetWord
pdfGetWordText
pdfGetWordLength
pdfGetWordFontName
pdfGetWordColor
pdfGetWordBox
pdfGetWordCharBox
pdfGetWordCharBox2
pdfGetWordSpaceAfter
pdfGetWordFontSize
pdfGetWordFontIsFixedWidth
pdfGetWordFontIsSerif
pdfGetWordFontIsSymbolic
pdfGetWordFontIsItalic
pdfGetWordFontIsBold
pdfGetWordRotation
pdfGetWordCharPos
pdfGetWordCharLen