Name
  doc:InsertPage -- insert new page into document
Synopsis

      page = doc:InsertPage(target)

Function
  `doc:InsertPage()` creates a new page and inserts it just before the specified page.

  `doc:InsertPage()` returns the handle of the newly created page object on success. Otherwise, it returns `Nil` and the error handler is called.

Inputs
  page
    the handle of a page object that should be the successor of the new page
Results
  page
    handle to a page
Errors
  `#HPDF_INVALID_DOCUMENT` - An invalid document handle was set.

  `#HPDF_FAILED_TO_ALLOC_MEM` - Memory allocation failed.

  `#HPDF_INVALID_PAGE` - An invalid page handle was set.

Show TOC