Name
  pdf.GetBookmarks -- get all bookmarks in a document (V1.1)
Synopsis

      t = pdf.GetBookmarks(id)

Function
  This function can be used to get all bookmarks in the PDF document specified by `id`. This PDF document must have been opened using pdf.OpenDocument().

  On return, `pdf.GetBookmarks()` will generate a table containing all bookmarks in the document. For each entry, the table will have the following fields initialized:

  `Title:`
    The bookmark's title text.

  `Action:`
    This field specifies what should happen if the respective bookmark is clicked. This will be set to one of the following special constants:

    `#PDFACTION_GOTO:`
      Skip to page in current document.
    `#PDFACTION_REMOTEGOTO:`
      Skip to page in another document.
    `#PDFACTION_URI:`
      Open an URI.
    `#PDFACTION_LAUNCH:`
      Launch a program.
    `#PDFACTION_UNSUPPORTED:`
      Unknown action.

  `Target:`
    This will be set to the bookmark's target. Depending on `Action`, this may be set to a page number, a URI, or the path to an external file.

  `Children:`
    If the bookmark can be unfolded, this item will be set to another table containing the same elements as its parent. Bookmarks can be infinitely nested.

Inputs
  id
    identifier of the PDF document to use
Results
  t
    table containing all document bookmarks (see above)

Show TOC