pdf.FindStart(id, page, s$[, flags, idx])
page
in
the document specified by id
. You have to pass the string that the page should be searched
for in the s$
argument. The optional argument flags
can be used to configure additional
options for the search operation. The flags
parameter can be a combination of the following
special constants:
#PDFFIND_MATCHCASE:
#PDFFIND_MATCHWHOLEWORD:
s$
matches a whole word.
By default, the search operation starts at the beginning of the page. You can change this
by passing a character index to start the search at in the optional idx
parameter. Note
that character indices start at 0. Passing -1 in the idx
parameter will start the search
at the end of the page.
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().
After you have called pdf.FindStart()
to initiate the search operation, you
then have to call either pdf.FindNext() or pdf.FindPrev() to actually
execute the search operation.