Name
  pdf.GetRects -- get bounding rectangles of character range (V1.1)
Synopsis

      t = pdf.GetRects(id, page, idx, len)

Function
  This function can be used to get a series of rectangles that encloses the text starting at the index specified by `idx`, spanning over `len` number of characters. Note that character indices start at 0. If you pass -1 in `len`, `pdf.GetRects()` will automatically extend the selection to all remaining characters.

  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().

  This function will return a table containing one subtable per bounding rectangle. Each of those subtables will have the following fields initialized:

  `Left:`
    Left boundary.
  `Top:`
    Top boundary.
  `Right:`
    Right boundary.
  `Bottom:`
    Bottom boundary.

Inputs
  id
    identifier of the PDF document to use
  page
    page number to use (starting from 1)
  idx
    character index to use (starting from 0)
  len
    number of characters to use or -1 for all remaining characters
Results
  t
    table containing a series of bounding rectangles (see above)

Show TOC