[Fixed]-Weasyprint pdf generation, too long, makes the download impossible. How to stream its creation?

1👍

I asked on the issue tracker: https://github.com/Kozea/WeasyPrint/issues/416

It is not doable and a suggested workaround is to

split the download into two steps: one route asynchronously generates the document and stores it on the filesystem, the second route downloads the generated document. When the document is not generated yet, you can hide the second link and display something like “the document is not generated yet” instead.

Leave a comment