Support PdfPTables and add support for events

Im happy to tidy this up a bit more if you like the changes.

Added the option to set page events, which provides another way to set the page number.
Added the option to set table events and PdfPTables. I have a PdfPTable event that provides alternating background. I could write these vents as generated classes for examples.
I moved setMargins before opening the doc in setup-doc (won't work otherwise)