JelteF / PyLaTeX

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

generate_pdf can return a byte stream? #198

Open morganteg opened 6 years ago

morganteg commented 6 years ago

generate_pdf can return a byte stream so I can show the pdf into a web page (http response) instead of creating a temporary file?

Thanks!

P.S.: great library!

JelteF commented 6 years ago

generate_pdf is just calling the latexmk or pdflatex command, which generates the file. I don't think they support sending to a byte stream (but I might be wrong, I suggest you Google a bit if there's options). What I usually do myself is generate a file with a unique name and send that one (you can do this with one of the keyword arguments).

On Mon, Nov 13, 2017, 15:59 morganteg notifications@github.com wrote:

generate_pdf can return a byte stream so I can show the pdf into a web page (http response) instead of creating a temporary file?

Thanks!

P.S.: great library!

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/JelteF/PyLaTeX/issues/198, or mute the thread https://github.com/notifications/unsubscribe-auth/ABG8Jpao8JewetVzwMgEk7DhpSd6YyZOks5s1_bpgaJpZM4QbXrc .