Max&Michal: Improved pdf template. PDF rendering is now handled by a sin...

...gle method.