Hi,
Google drive link for repro zip:
We are seeing an OutOfMemoryException during PPTX-to-PDF conversion with the
latest Aspose.Slides for .NET. The issue occurs on a 64-bit Windows Azure App
Service when the presentation contains an ActiveX control, such as a checkbox.
Environment
- Aspose.Slides for .NET: 26.7.0 (latest NuGet release verified 24 July 2026)
- Hosting: Windows Azure App Service
- Process: 64-bit
- Target framework: .NET 9.0
Reproduction
- Load the attached PPTX containing an ActiveX checkbox.
- Call
presentation.Save(outputPdfPath, SaveFormat.Pdf).
Loading the presentation succeeds. The exception is thrown only during PDF export:
using (Presentation presentation = new Presentation(inputPath))
{
presentation.Save(outputPdfPath, SaveFormat.Pdf);
}
Actual result
Presentation.Save throws OutOfMemoryException. The relevant stack trace is:
at Windows.Win32.Graphics.GdiPlus.StatusExtensions.ThrowIfFailed(Status status)
at System.Drawing.Image.LoadGdipImageFromStream(IStream* stream, Boolean useEmbeddedColorManagement)
at System.Drawing.Image.LoadGdipImageFromStream(Stream stream, Boolean useEmbeddedColorManagement)
at System.Drawing.Image.FromStream(Stream stream)
at [Aspose.Slides obfuscated internal method](Stream)
at [Aspose.Slides obfuscated internal method](Stream)
at [Aspose.Slides obfuscated internal method](Byte[])
at Aspose.Slides.PPImage.[obfuscated method]()
at [Aspose.Slides obfuscated internal method](..., PPImage)
at [Aspose.Slides obfuscated internal method](..., SizeF, ..., IBaseSlide, Boolean, PictureFillFormat)
at Aspose.Slides.Picture.[obfuscated method](..., SizeF, ..., IBaseSlide, Boolean, PictureFillFormat)
at [Aspose.Slides obfuscated internal constructor](..., PictureFillFormat, Boolean)
at [Aspose.Slides obfuscated internal constructor](..., PictureFillFormat)
at Aspose.Slides.Control.[obfuscated method](...)
at [Aspose.Slides obfuscated internal method](...)
at [Aspose.Slides obfuscated internal method](..., IShapeFrame, ..., Boolean, Boolean, InterruptionToken)
at [Aspose.Slides obfuscated internal method](..., IShapeFrame, ..., InterruptionToken)
at [Aspose.Slides obfuscated internal method](..., InterruptionToken)
at Aspose.Slides.Slide.[obfuscated method](Boolean, ..., ..., List`1, InterruptionToken)
at [Aspose.Slides obfuscated internal method](Presentation, Stream, Int32[], PdfOptions, InterruptionToken)
at [Aspose.Slides obfuscated internal method](Presentation, Stream, PdfOptions, InterruptionToken)
at Aspose.Slides.Presentation.Save(Stream stream, SaveFormat format, ISaveOptions options)
at Aspose.Slides.Presentation.Save(String fname, SaveFormat format)
The original unredacted/obfuscated stack trace from the deployed application is
included in FULL-STACK-TRACE.txt.
Workaround and isolation
If we reload the same presentation and remove the ActiveX controls before saving,
PDF export succeeds:
using (Presentation presentation = new Presentation(inputPath))
{
foreach (ISlide slide in presentation.Slides)
{
for (int index = slide.Controls.Count - 1; index >= 0; index--)
{
slide.Controls.RemoveAt(index);
}
}
presentation.Save(outputPdfPath, SaveFormat.Pdf);
}
This isolates the failure to rendering the ActiveX control. The stack also appears
to show the control’s PPImage being decoded through
System.Drawing.Image.FromStream; therefore, the exception does not appear to be
genuine process memory exhaustion.
The same document succeeds locally, but fails in the Windows Azure App Service.
Possibly related issue
This may be related to SLIDESNET-43495, reported in the forum thread
“OutOfMemoryException in GetThumbnails on Linux for ActiveX Object”:
That issue also involves an OutOfMemoryException while rendering a slide
containing an ActiveX object, although our case is Windows Azure App Service and
Presentation.Save(..., SaveFormat.Pdf).
Could you please reproduce and confirm whether this is the same defect, a
regression, or a new issue? A minimal console reproducer and the smallest affected
PPTX are attached.