Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Store the generated PDF in byteIO #357

Open
anu0012 opened this issue Sep 27, 2022 · 0 comments
Open

Store the generated PDF in byteIO #357

anu0012 opened this issue Sep 27, 2022 · 0 comments

Comments

@anu0012
Copy link

anu0012 commented Sep 27, 2022

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant