work in progress fixing issues with createPDF method