page = doc:AddPage()
doc:AddPage()
creates a new page and adds it after the last page of a document.
doc:AddPage()
returns the handle of created page object on success.
Otherwise, it returns an error code and the error handler is called.
#HPDF_INVALID_DOCUMENT
- An invalid document handle was set.
#HPDF_FAILED_TO_ALLOC_MEM
- Memory allocation failed.