new function returns path to generated PDF, instead of pushing it to output stream