made the pdf renderer reusable (eg. how cocoon uses it) prevents it creating invalid documents frees up memory