Name
pdf.FindStart -- initiate search operation (V1.1)
Synopsis
pdf.FindStart(id, page, s$[, flags, idx])
Function
This function can be used to start a new search operation on the page specified by 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:
If this flag is set, the search operation will be done in a case-sensitive way.

#PDFFIND_MATCHWHOLEWORD:
If this flag is set, a search result is only triggered if 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.

Inputs
id
identifier of the PDF document to use
page
page number to search (starting from 1)
s$
string to search for
flags
optional: combination of flags specifying additional options (see above) (defaults to 0)
idx
optional: character index to start search at (defaults to 0)

Show TOC