This method actually prints the document. It is called after initialize and
layoutPages for the whole document
protected abstract int getPageNumber()
This method should be called at the end of the layout phase or during the
protected abstract void initialize()
This method is called just before the actual printing in order to initialize
widgets that depend from the content of the full document. This is typically
needed for table of content. Please note that at this point, pages may not
have been layout yet
This method is called just after initalize and before print. All PDFParts
should perform their page layout at this point. At the end, all pages should
be setup, and the index of each page should be known.
pagesbefore - the number of pages layed-out before.