modified version of pdfkit, do not use if you don't know what it is