Issue with font files

I’m noticed that while adding the svg graphics to pdf document all the fonts that are being used in the graphic are copied to the appropriate temp folder. The issue is that handles to those font files aren’t released after document is saved and disposed, rather the process keeps their handle for its whole lifetime. While generating next documents, copies of the same font files are being added to the temp folder, until some threshold is reached and it is impossible to add graphics to the document, since exception is being thrown.
Here is a sample project:
svg-in-pdf-app.zip (3.0 KB)

Please see the attached console application that hopefully can demonstrate the problem. Try generating relatively large number of dummy pdf files (e.g. 300) and see that:

  1. After first iteration “TempFontsGraphics” folder with all used font is being created in Temp directory.
    temp-graphics-folder.png (10.0 KB)
  2. Each subsequent iteration will create copies of fonts directly in the Temp folder.
    temp-fonts.png (53.3 KB)
  3. As soon as 255th copy is about to be created – application crashes.
    console-error.png (30.9 KB)

Side notes:
• IOutputStorage implementation is take from samples (Save an SVG Document - C#).
• Disposables class is added just to make sure that all relevant dispose calls are made explicitly.

@ManMasterDevelopment, This question is about products: Aspose.PDF, Aspose.SVG. Try to ask it in the appropriate sections of the forum: Aspose.PDF Product Family - Free Support Forum - aspose.com or Aspose.SVG Product Family - Free Support Forum - aspose.com

@ManMasterDevelopment, While we are investigating what is the reason, could you use version .Net7.0 for this purpose, there are no such problems.
Or you can use the Aspose.PDF.Drawing package, Aspose.Imaging package does not need to be installed

@ManMasterDevelopment
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-6461

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.

The issues you have found earlier (filed as IMAGINGNET-6461) have been fixed in this update. This message was posted using Bugs notification tool by samer.el-khatib