Closed wgundamj44 closed 7 months ago
Thank you for raising your first issue! Your help to improve svglib is much appreciated!
It's totally possible the file is never removed. Any implementation suggestion is welcome.
I think instead of creating a temporary file here https://github.com/deeplook/svglib/blob/main/svglib/svglib.py#L695, maybe it can create a PIL.Image
instead. From what I read, reportlab.graphcis.renderPDF.drawImage
can accept PIL.Image
in new versions.
Any pull request is welcome!
Fixed by 484d3660a34cfedb24431aed8ecbb61a30afb193
When using svglib on svgs that have images, we found the disk size keeps growing up. The culprit is the temporary files created by this method
xlink_href_target
.This line https://github.com/deeplook/svglib/blob/main/svglib/svglib.py#L701 mentioned the temporary files needs to be removed later, but I didn't find the place where they got removed.
Did I miss something or the removal is really missing?