Add option to return the generate PDF file instead of its data