Better error messages in case of bean errors.
PRD-4626: Page spanned printing caused PDF exports to print the text of the first page twice. For tests: Opened up API to allow test code injection.
Merge pull request #154 from tmorgner/master

PRD-4626 test case and fix