High Memory Usage when Generating Large PDF with Images using Aspose.PDF for .NET (v25.4.0, .NET 8.0)

We are using Aspose.PDF for .NET (v25.4.0) in a .NET 8.0 application to generate large PDF reports that contain a significant number of images (400+), along with text content.

While generating the report, we observed that the memory usage grows beyond 2 GB. To optimize, we attempted splitting the report into multiple section-wise PDF files and then merging them into a final single PDF. However, even after explicitly disposing the objects after each section PDF creation, the memory usage does not reduce.

This leads to continuous high memory consumption (>2 GB), eventually causing performance degradation and risks of hitting memory limits.

Expectation:

  • Memory usage should be released after disposing intermediate PDF documents during section-wise generation.
  • The overall process should allow generating large reports without excessive memory consumption.

Issue:

  • Memory remains consistently high even after disposing section-level PDF objects.
  • This behavior prevents efficient handling of large reports.

Environment Details:

  • Aspose.PDF for .NET: 25.4.0
  • .NET Core: 8.0
  • Content: ~400+ images + text

Request:
Could you please advise on:

  1. Whether this is a known memory management issue with Aspose.PDF.
  2. Recommended best practices for handling large PDF generation with many images.
  3. Any configuration, API usage patterns, or workarounds to ensure memory is released properly after disposing intermediate documents.

@koc-it-support

Since the issue is about Aspose.PDF I have created new topic in Aspose Free Support Forum - High Memory Usage when Generating Large PDF with Images using Aspose.PDF for .NET (v25.4.0, .NET 8.0) - Free Support Forum - aspose.com.