idx, len = pdf.GetFindResult(id, page)
True
. In that case, pdf.GetFindResult()
will return the character index of the search string's occurrence on the page as well
as its length. Character indices start from 0.
The page to use must be specified in the page
argument. It must be a number in
the range of 1 to the total number of pages in the document and the page must have
been previously loaded using pdf.LoadPage() with the text
argument set
to True
. The PDF document specified by id
must have been previously opened using
pdf.OpenDocument().