[reportlab-users] Canvas does not work with SpooledTemporaryFile

Robert Schroll rschroll at gmail.com
Fri Mar 19 01:25:11 EDT 2021


On Mon, Mar 15, 2021 at 2:11 AM Robin Becker <robin at reportlab.com> wrote:

> it gives us a bit of extra information should we ever see the filename.
> However, there's a flaw in that as soon as the
> file gets rolled over (if it ever does) then it will presumably get a name
> and it won't be the same.
>

That looks reasonable to me.  In my case, I was looking to use a
SpooledTemporaryFile to convey the output of ReportLab to pdfrw.  If the
file is small, it's better to keep it all in memory, but if it's large,
it'd be better to let it roll over to disk.   The SpooledTemporaryFile
should let that happen automatically.  I don't actually care where it's
stored, so the filename changing doesn't bother me at all.

Thanks for the quick fix,
Robert
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://pairlist2.pair.net/pipermail/reportlab-users/attachments/20210318/0450d093/attachment.html>


More information about the reportlab-users mailing list