Separate pdf generation into a own module