JelteF / PyLaTeX

A Python library for creating LaTeX files
https://jeltef.github.io/PyLaTeX/
MIT License
2.24k stars 287 forks source link

Store the generated PDF in byteIO #357

Open anu0012 opened 1 year ago

anu0012 commented 1 year ago

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