How can I store the document object into a binary string(i.e. byteIO)? I want to store the generated pdf in memory in terms of bytesIO so that the user can download the pdf file by clicking on the download button. I don't want to store the pdf file on the server side.
Can someone please guide me on how to achieve it?
Hi there,
How can I store the document object into a binary string(i.e. byteIO)? I want to store the generated pdf in memory in terms of bytesIO so that the user can download the pdf file by clicking on the download button. I don't want to store the pdf file on the server side. Can someone please guide me on how to achieve it?
Here is an example of the same using the xhtml2pdf library. https://github.com/xhtml2pdf/xhtml2pdf/blob/master/demo/cherrypy/demo-cherrypy.py
Thanks