Parthi
Parthi

Reputation: 391

Retrieve the text content with bounds from PDF document using Pdfium library

I tried to get the text content from PDF document with bounds using Pdfium but I could not found the respective API. The below API retrieve the text content alone.

FPDFText_GetText

Please let me know if any other possible way to retrieve the text content along with bounds using Pdfium.

Upvotes: 3

Views: 2731

Answers (1)

dj2
dj2

Reputation: 9598

You can use FPDFText_CountRects to get a count of bounding rect boxes then FPDFText_GetRect for each of those counted rects. You can then use FPDFText_GetBoundedText to retrieve the text inside the given bounding box. The API docs for those are all inside fpdf_text.h

Upvotes: 3

Related Questions