In iText 5, we introduced the concept of page events to allow developers to add specific behavior when a document is opened, when a new page is opened, when a page ends, and when a document is closed.
In the documentation, we made it very clear that it was forbidden to add content in the onStartP...