Hi @asad.ali, we are facing the same issue with aspnet core 5 container (Debian 11). it works in Windows.
this is the line of code its failing at (GetNextImage):
PdfConverter converter = new PdfConverter();
stream.Position = 0;
converter.BindPdf(stream);
converter.DoConvert();
int pageNumber = 1;
//Check if pages exist and then convert to image one by one
while (converter.HasNextImage())
{
MemoryStream imageStream = new MemoryStream();
converter.GetNextImage(imageStream, System.Drawing.Imaging.ImageFormat.Jpeg);
and below is the error log
System.OutOfMemoryException:
at System.Drawing.SafeNativeMethods+Gdip.CheckStatus (System.Drawing.Common, Version=5.0.0.2, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51)
at System.Drawing.Graphics.get_ClipBounds (System.Drawing.Common, Version=5.0.0.2, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51)
at #=zciTlGLc_3S$We7ZsQlA8VEoRdQbrX6qyLMIrYMU=.#=ziYYr_mEsPD4m (Aspose.PDF, Version=22.2.0.0, Culture=neutral, PublicKeyToken=716fcc553a201e56)
at #=zZ6lUGLojU6wvByyTys0oP4GopVPlipbb8YCYXMRXwK9RnCnF7g==.#=z652174FUtw1L (Aspose.PDF, Version=22.2.0.0, Culture=neutral, PublicKeyToken=716fcc553a201e56)
at #=zoZbZ78XusXM_nzRHEWgXZaskeNtsMSidg8nKj2utxoBq.#=z9od4YRF6F0Qo (Aspose.PDF, Version=22.2.0.0, Culture=neutral, PublicKeyToken=716fcc553a201e56)
at #=zoZbZ78XusXM_nzRHEWgXZaskeNtsMSidg8nKj2utxoBq.#=zRUUa0H4= (Aspose.PDF, Version=22.2.0.0, Culture=neutral, PublicKeyToken=716fcc553a201e56)
at #=zwDke0qLP6_TZqOtxwhERJYRuDw8nso2p4r3UuiUpxfk3.#=z6c9BBlVBU5lC (Aspose.PDF, Version=22.2.0.0, Culture=neutral, PublicKeyToken=716fcc553a201e56)
at #=zwDke0qLP6_TZqOtxwhERJYRuDw8nso2p4r3UuiUpxfk3.#=zRxX32zo= (Aspose.PDF, Version=22.2.0.0, Culture=neutral, PublicKeyToken=716fcc553a201e56)
at #=zzeBqYrHwMR7Jfo5xz5yCEN1V9fyY.#=zQ200CKM= (Aspose.PDF, Version=22.2.0.0, Culture=neutral, PublicKeyToken=716fcc553a201e56)
at #=zzeBqYrHwMR7Jfo5xz5yCEN1V9fyY.#=zQ200CKM= (Aspose.PDF, Version=22.2.0.0, Culture=neutral, PublicKeyToken=716fcc553a201e56)
at Aspose.Pdf.Devices.ImageDevice.#=zQ200CKM= (Aspose.PDF, Version=22.2.0.0, Culture=neutral, PublicKeyToken=716fcc553a201e56)
at Aspose.Pdf.Devices.JpegDevice.Process (Aspose.PDF, Version=22.2.0.0, Culture=neutral, PublicKeyToken=716fcc553a201e56)
at Aspose.Pdf.Facades.PdfConverter.GetNextImage (Aspose.PDF, Version=22.2.0.0, Culture=neutral, PublicKeyToken=716fcc553a201e56)
at Aspose.Pdf.Facades.PdfConverter.GetNextImage (Aspose.PDF, Version=22.2.0.0, Culture=neutral, PublicKeyToken=716fcc553a201e56)
at Bupa.Vision.Infrastructure.Services.FileConversionService+d__7.MoveNext (Bupa.Vision.Infrastructure, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null: /src/src/Infrastructure/Services/FileConversionService.cs:128)
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw (System.Private.CoreLib, Version=5.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Private.CoreLib, Version=5.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
Any help would be appreciate.
Thanks!