SVG Loading results in temporary font files

Hi,

We are running multiple Aspose.Images processes on a single machine that convert non GDI supported image formats to PNG. When processing SVG files, we see that Aspose.Images is caching files in %temp%\TempFonts. There seems to be an issue where these files do not get cleaned up automatically (possibly due to bad SVGs OR interference from the other processes - we’re still working on this). Unfortunately, this is resulting in filling up the hard drive and causing problems.

Would it be possible to provide a means for us to specify the temporary directory to be used by our process so that we can clean it when the process terminates?

Thanks!

@CyberChr1s We utilize the path of the current user’s temporary folder, and our public API does not have any endpoints that allow this to be changed. We will look into the temporary file clean-up process. Thank you for bringing this to our attention.

@CyberChr1s
We have opened the following new ticket(s) in our internal issue tracking system and will deliver their fixes according to the terms mentioned in Free Support Policies.

Issue ID(s): IMAGINGNET-6835

You can obtain Paid Support Services if you need support on a priority basis, along with the direct access to our Paid Support management team.

@CyberChr1s Could you please provide details about the environment in which you are using Aspose.Imaging?

Windows 10/11

@CyberChr1s Thank you for details we will investigate your issue.

Hi @CyberChr1s, in the latest versions of the library, we have optimized the font cache it is used only in rare cases. Could you check how well the application works with the latest version of Aspose.Imaging?

I certainly will do.

Aside from font caching, are you able to confirm if there is any other caching that Aspose.Imaging uses? We are seeing very large files in our temp directory (with filenames such as and .JFM.

Thanks,

image001.jpg (1.04 KB)

@christopher.davies Other files may be created in the Temp folder and should be deleted after the process is complete. Could you override the location of the Temp folder using the system?

Potentially we can override the temporary folder, but right now we have multiple processes all using the same temporary folder. I suspect this is causing contention somewhere in the Aspose library and is resulting in massive (30GB+) empty files being created.

In general, does Aspose use the temp directory to store rendered/partially rendered images? If so, would there be a way to just do this in memory (even if via an option)?

Thanks,

image001.jpg (1.04 KB)

@CyberChr1s, Aspose.Imaging uses the Temp folder, cannot be disabled via the option, however if you use the BufferSizeHint option it increases the chance of using the cache.

Interesting, what exactly does the BufferSizeHint actually control?

Thanks!

image001.jpg (1.04 KB)

@christopher.davies , LoadOptions.BufferSizeHint controls maximal allocation unit in MBs to avoid potential OutOfMeroryException. In case of partial processing it requires disk space, so using this option temp files may appear.